Gathering detailed insights and metrics for @kingjs/linq.except
Gathering detailed insights and metrics for @kingjs/linq.except
Gathering detailed insights and metrics for @kingjs/linq.except
Gathering detailed insights and metrics for @kingjs/linq.except
npm install @kingjs/linq.except
Typescript
Module System
Node Version
NPM Version
JavaScript (81.43%)
Shell (18.57%)
Total Downloads
2,803
Last Day
11
Last Week
11
Last Month
14
Last Year
198
442 Commits
1 Watching
13 Branches
1 Contributors
Latest Version
1.0.12
Package Id
@kingjs/linq.except@1.0.12
Unpacked Size
4.84 kB
Size
2.23 kB
File Count
4
NPM Version
6.2.0
Node Version
8.0.0
Cumulative downloads
Total Downloads
Last day
0%
11
Compared to previous day
Last week
266.7%
11
Compared to previous week
Last month
100%
14
Compared to previous month
Last year
-52.3%
198
Compared to previous year
2
Generates the set difference of two sequences.
Remove duplicates from the sequence 0
, 0
, 1
, 2
and also exclude values 1
and 2
like this:
1var except = require('@kingjs/linq.except'); 2var sequence = require('@kingjs/enumerable.create'); 3var toArray = require('@kingjs/linq.to-array'); 4 5var justZero = except.call( 6 sequence(0, 0, 1, 2), 7 sequence(1, 2) 8); 9 10toArray.call(justZero);
result:
1[0]
Remove duplicates from a sequence based on an id
and also exclude those with id
equal to 1
like this:
1var except = require('@kingjs/linq.except'); 2var sequence = require('@kingjs/enumerable.create'); 3var toArray = require('@kingjs/linq.to-array'); 4 5var enumerable = sequence( 6 { id: 0, name: 'foo' }, 7 { id: 0, name: 'bar' }, 8 { id: 1, name: 'baz' } 9); 10 11var justZero = except.call( 12 enumerable, 13 sequence({ id: 1, name: 'moo' }), 14 function(x) { return x.id; } 15); 16 17toArray.call(justZero);
result:
1[{ 2 id: 0, 3 name: 'foo' 4}]
1function except( 2 this: Enumerable, 3 exceptions: Enumerable, 4 idSelector?: (x) => any 5): Enumerable;
Enumerable
: See @kingjs/enumerable.define.this
: The first sequence.exceptions
: The second sequence.idSelector
: Return a value whose stringified representation uniquely identifies an element.
x
: The element to identify.Returns elements in the first sequence except those also present in the second sequence.
Elements are deemed equal if their stringified id representations returned by idSelector
are the same.
Only unique elements are included in the resulting sequence.
Elements are included in the order they appear in the first sequence.
With npm installed, run
$ npm install @kingjs/link.exclude
Like Enumerable.Exclude
.
MIT
No vulnerabilities found.
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
no SAST tool detected
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
31 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-12-16
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