Package
dom-closest
For a given DOM element, find the first ancestor that matches a given CSS selector.
Key numbers
As of 25 Sept 2026
- Weekly downloads
- 84.6k
- -7% over 12 months
- Gzip bundle size
- -
- No Bundlephobia data
- Dependencies
- 1
- Direct, from package.json
- Last release
- 11 years ago
- v0.2.0
- GitHub stars
- 23
- 1 forks
- Open issues / PRs
- 0 / 0
- Contributors
- -
- Commits, last 52 weeks
- 0
Downloads
Last week 2026-09-15 to 2026-09-21
84,621 downloads last week, 327,861 in the last month. The 12-month change of -7% compares the average of the last 4 weeks with the first 4 weeks of the series.
- Releases, last 12 months
- -
- Latest version
- 0.2.0, 18 Aug 201511 years ago
- First published
- -
- Last push to GitHub
- 11 Nov 20153,970 days before the snapshot
- Repository archived
- No
- Open issues
- 0
- Open pull requests
- 0
- Commits, last 52 weeks
- 0
- Dependents on npm
- 344
Major versions
-
Recent releases
-
- Module format
- -Not determined from package.json
- TypeScript types
- None
- Node.js engine range
- Not declared
- Runtimes
- -
- Unpacked size (npm)
- -
- Dependencies (1)
dom-matches
npm install dom-closest- jsDelivr
https://cdn.jsdelivr.net/npm/dom-closest@0.2.0/ - unpkg
https://unpkg.com/dom-closest@0.2.0/ - esm.sh
https://esm.sh/dom-closest@0.2.0
| Package | Weekly downloads | Gzip | Last release | Module | Comparison |
|---|---|---|---|---|---|
| is-dom-node | 7.5k | - | 8 years ago | ESM + CommonJS | - |
| is-dom-node-list | 7.5k | - | 8 years ago | ESM + CommonJS | - |
Indexability: Indexed.