Gathering detailed insights and metrics for callback-chain-resolver
Gathering detailed insights and metrics for callback-chain-resolver
npm install callback-chain-resolver
Typescript
Module System
Node Version
NPM Version
71.2
Supply Chain
85
Quality
79.7
Maintenance
100
Vulnerability
100
License
TypeScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
3,153
Last Day
1
Last Week
9
Last Month
47
Last Year
231
1 Stars
20 Commits
2 Forks
1 Watching
2 Branches
2 Contributors
Minified
Minified + Gzipped
Latest Version
16.0.0
Package Id
callback-chain-resolver@16.0.0
Unpacked Size
22.96 kB
Size
6.66 kB
File Count
23
NPM Version
7.20.3
Node Version
16.3.0
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
-47.1%
9
Compared to previous week
Last month
261.5%
47
Compared to previous month
Last year
-38.6%
231
Compared to previous year
3
Version 16 introduces series
and parallel
functions and removes earlier functions.
Helps you generate values out of functions in series or in parallel.
npm i callback-chain-resolver
1 2import {series, parallel} from 'callback-chain-resolver' 3 4const incrementBy1 = (x) => x + 1; 5const decrementBy1 = (x) => x - 1; 6const double = x => 2 * x 7const square = x => x * x 8const cube = x => x * square(x) 9 10series(1, [incrementBy1, incrementBy1, incrementBy1]) // === 4 11series(1, [incrementBy1, incrementBy1, incrementBy1, double, square]) // === 64 12series(1, [incrementBy1, incrementBy1, incrementBy1, cube]) // === 64 13series(1, [decrementBy1, decrementBy1, decrementBy1]) // === -2 14series(1, [incrementBy1, decrementBy1]) // === 1 15series(1, [incrementBy1, cube, decrementBy1]) // === 7 16series(1, [decrementBy1, incrementBy1]) // === 1 17 18parallel(1, [incrementBy1, incrementBy1, incrementBy1]) // === [2, 2, 2] 19parallel(1, [incrementBy1, incrementBy1, incrementBy1, double, square]) // [2, 2, 2, 2, 1] 20
Check test cases for more examples.
Throws compile time error if you pass mixed output type functions.
For example when you add toString
to the typedResolver test cases.
1TS2345: Argument of type '(((x: number) => number) | ((x: number) => string))[]' is not assignable to parameter of type 'FnT<number>[]'. 2 Type '((x: number) => number) | ((x: number) => string)' is not assignable to type 'FnT<number>'. 3 Type '(x: number) => string' is not assignable to type 'FnT<number>'. 4 Type 'string' is not assignable to type 'number'
Use any
in <any>
while invoking mixed functions.
MIT © 2016 - 2021
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
1 existing vulnerabilities detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/17 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
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 2025-02-03
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