Installations
npm install p-transform
Score
99.5
Supply Chain
99.5
Quality
83
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Developer
mshima
Developer Guide
Module System
ESM
Min. Node Version
>=18.19.0
Typescript Support
Yes
Node Version
18.20.4
NPM Version
10.8.2
Statistics
74 Commits
2 Watching
3 Branches
1 Contributors
Updated on 21 Nov 2024
Languages
TypeScript (99.54%)
JavaScript (0.46%)
Total Downloads
Cumulative downloads
Total Downloads
46,782,068
Last day
3.3%
81,771
Compared to previous day
Last week
2.4%
437,462
Compared to previous week
Last month
8.6%
1,797,920
Compared to previous month
Last year
44.5%
22,896,388
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
p-transform
Promised out of order transform.
Usage
Builds a out-of-order Duplex using a p-queue parallel queue.
transform
implementation must be sync or return a promise. Callback is not supported.
Promisified pipeline
and transform
shortcut are provided for convenience.
import { OutOfOrder, transform, pipeline, passthrough, filter } from 'p-transform';
await pipeline(
new OutOfOrder(
{ transform: async file => file },
{ concurrency: 7 },
).duplex(() => console.log('done')),
passthrough(async file => {}, () => console.log('done')),
filter(async file => true, () => console.log('done')),
transform(async file => file, () => console.log('done')),
)
Debug
Use DEBUG=p-transform:*
environment variable.
License
Apache-2.0
API
Classes
Constants
- pipeline
Promisified pipeline
Functions
- transform(transform, end)
Shortcut to create a OutOfOrder with transform and end callback
- passthrough(spy, end)
Shortcut to create a passthrough OutOfOrder with spy and end callback
- filter(filter, end)
Shortcut to create a filter OutOfOrder with filter and end callback
OutOfOrder
Kind: global class
new OutOfOrder(transform[, queueOptions])
OutOfOrder
Param | Type | Description |
---|---|---|
[transform] | function | Transform. |
[queueOptions] | Object | Options forwarded to PQueue instance. |
outOfOrder.duplex(end) ⇒ Duplex
Build Duplex.
Kind: instance method of OutOfOrder
Returns: Duplex
Param | Type |
---|---|
end | function |
pipeline
Promisified pipeline
transform(transform, end)
Shortcut to create a OutOfOrder with transform and end callback.
Kind: global function
Param | Type |
---|---|
transform | function |
end | function |
passthrough(spy, end)
Shortcut to create a passthrough OutOfOrder with spy and end callback.
Kind: global function
Param | Type |
---|---|
spy | function |
end | function |
filter(filter, end)
Shortcut to create a filter OutOfOrder with filter and end callback.
Kind: global function
Param | Type |
---|---|
filter | function |
end | function |
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE.txt:0
- Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.txt:0
Reason
1 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
Reason
9 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 7
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/mshima/p-transform/node.js.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/mshima/p-transform/node.js.yml/main?enable=pin
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 1 out of 1 npmCommand dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/node.js.yml:1
- Info: no jobLevel write permissions found
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
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 'main'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 1 are checked with a SAST tool
Score
4.2
/10
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 MoreOther packages similar to p-transform
@babel/plugin-transform-modules-commonjs
This plugin transforms ES2015 modules to CommonJS
@babel/plugin-transform-for-of
Compile ES2015 for...of to ES5
@babel/plugin-transform-block-scoping
Compile ES2015 block scoping (const and let) to ES5
@babel/plugin-transform-duplicate-keys
Compile objects with duplicate keys to valid strict ES5