Gathering detailed insights and metrics for filter-obj
Gathering detailed insights and metrics for filter-obj
Gathering detailed insights and metrics for filter-obj
Gathering detailed insights and metrics for filter-obj
npm install filter-obj
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
100 Stars
41 Commits
9 Forks
10 Watching
1 Branches
8 Contributors
Updated on 10 Sept 2024
JavaScript (79.22%)
TypeScript (20.78%)
Cumulative downloads
Total Downloads
Last day
-9.4%
1,505,089
Compared to previous day
Last week
1.7%
8,705,033
Compared to previous week
Last month
6%
36,818,286
Compared to previous month
Last year
26.2%
389,186,768
Compared to previous year
Filter object keys and values into a new object
1npm install filter-obj
1import {includeKeys, excludeKeys} from 'filter-obj'; 2 3const object = { 4 foo: true, 5 bar: false 6}; 7 8const newObject = includeKeys(object, (key, value) => value === true); 9//=> {foo: true} 10 11const newObject2 = includeKeys(object, ['bar']); 12//=> {bar: false} 13 14const newObject = excludeKeys(object, (key, value) => value === true); 15//=> {bar: false} 16 17const newObject3 = excludeKeys(object, ['bar']); 18//=> {foo: true}
Type: object
The source object to filter properties from.
Type: (sourceKey: string | symbol, sourceValue: unknown, source: object) => boolean
A predicate function that determines whether a property should be filtered.
Type: Array<string | symbol> | Set<string | symbol>
An array or Set
of property keys to be filtered.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 15/30 approved changesets -- score normalized to 5
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
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
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
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