Installations
npm install @kingjs/linq.except
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
8.0.0
NPM Version
6.2.0
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (81.43%)
Shell (18.57%)
Developer
Download Statistics
Total Downloads
2,803
Last Day
11
Last Week
11
Last Month
14
Last Year
198
GitHub Statistics
442 Commits
1 Watching
13 Branches
1 Contributors
Package Meta Information
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
Total Downloads
Cumulative downloads
Total Downloads
2,803
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
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
@kingjs/linq.except
Generates the set difference of two sequences.
Usage
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}]
API
1function except( 2 this: Enumerable, 3 exceptions: Enumerable, 4 idSelector?: (x) => any 5): Enumerable;
Interfaces
Enumerable
: See @kingjs/enumerable.define.
Parameters
this
: The first sequence.exceptions
: The second sequence.idSelector
: Return a value whose stringified representation uniquely identifies an element.x
: The element to identify.
Result
Returns elements in the first sequence except those also present in the second sequence.
Remarks
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.
Install
With npm installed, run
$ npm install @kingjs/link.exclude
Acknowledgments
Like Enumerable.Exclude
.
License
MIT
No vulnerabilities found.
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
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
- Warn: no pull requests merged into dev branch
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
31 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-4w2v-q235-vp99
- Warn: Project is vulnerable to: GHSA-cph5-m8f7-6c5x
- Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q
- Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4
- Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g
- Warn: Project is vulnerable to: GHSA-vxvm-qww3-2fh7
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-jv35-xqg7-f92r
- Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6
- Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
Score
1.7
/10
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