Gathering detailed insights and metrics for @cfpb/dom-closest
Gathering detailed insights and metrics for @cfpb/dom-closest
Gathering detailed insights and metrics for @cfpb/dom-closest
Gathering detailed insights and metrics for @cfpb/dom-closest
⚠️ THIS REPO IS DEPRECATED ⚠️ Micro framework for building Atomic Design components
npm install @cfpb/dom-closest
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
GPL-3.0 License
3 Stars
75 Commits
3 Forks
14 Watchers
4 Branches
10 Contributors
Updated on Jan 28, 2023
Latest Version
1.0.0
Package Id
@cfpb/dom-closest@1.0.0
Size
1.37 kB
NPM Version
3.7.3
Node Version
4.1.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
No dependencies detected.
Utility for finding the closest parent of the current element (or the current element itself) which matches the selector.
<div id="test-block-a" class="test-class test-class-a">
<div id="test-block-b" class="test-class-b" >
<div id="test-block-c" class="test-class-c"></div>
</div>
</div>;
var assert = require( 'assert' );
var closest = require( '@cfpb/dom-closest' ).closest;
var testBlockA = document.getElementById( 'test-block-a' );
var testBlockB = document.getElementById( 'test-block-b' );
var element = domClosest( testBlockB, 'div' );
assert( element === testBlockB, true );
element = domClosest( testBlockB, '.test-class' );
assert( element === testBlockA );
npm install @cfpb/dom-closest
We welcome your feedback and contributions. See the contribution guidelines for more details.
Additionally, you may want to consider contributing to the Capital Framework, which is the front-end pattern library used in this project.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 8/19 approved changesets -- score normalized to 4
Reason
project is archived
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
93 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More