Skip to content
JS
Package

dom-closest

For a given DOM element, find the first ancestor that matches a given CSS selector.

v0.2.0, 18 Aug 2015MIT-Types: NoneDOM and browser utilities
$ npm install dom-closest

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
050k100k150kSept 2025Mar 2026Sept 2026High 136.5k (9 Jun 2026)Low 40.7k (30 Dec 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

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
  • jsDelivrhttps://cdn.jsdelivr.net/npm/dom-closest@0.2.0/
  • unpkghttps://unpkg.com/dom-closest@0.2.0/
  • esm.shhttps://esm.sh/dom-closest@0.2.0
PackageWeekly downloadsGzipLast releaseModuleComparison
is-dom-node7.5k-8 years agoESM + CommonJS-
is-dom-node-list7.5k-8 years agoESM + CommonJS-
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Indexed.