Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
p-transform
Advanced tools
Promised out of order transform.
A Transform that uses objectMode and implements custom _write
and _flush
methods.
transform
implementation must be sync or return a promise. Callback is not supported.
Promisified pipeline
and transform
shortcut are provided for convenience.
import PTransform, { transform, pipeline } from 'p-transform';
await pipeline(
new PTransform({
transform: async file => file
}),
transform(async file => file);
)
Use DEBUG=p-transform:*
environment variable.
For custom debug name set logName
option at PTransform constructor or transform
argument.
Apache-2.0
Promisified pipeline
Shortcut to create a PTransform with transform and logName.
Shortcut to create a passthrough PTransform with spy and logName.
Shortcut to create a filter PTransform with filter and logName.
Kind: global class
PTransform
Param | Type | Description |
---|---|---|
[options] | Object | Options object forwarded to Transform. |
[options.logName] | String | Custom name for logger. |
[options.transform] | function | Transform function. |
[options.queueOptions] | Object | Options forwarded to PQueue instance. |
PTransform
Set log name.
Kind: instance method of PTransform
Returns: PTransform
- this
Param | Type |
---|---|
name | String |
Wait for queue idle.
Kind: instance method of PTransform
Returns: Promise
Queued transform operation.
Kind: instance method of PTransform
Returns: Promise
Param | Type |
---|---|
chunk | Object |
encoding | String |
Promisified pipeline
Shortcut to create a PTransform with transform and logName.
Kind: global function
Param | Type |
---|---|
transform | function |
logName | String |
Shortcut to create a passthrough PTransform with spy and logName.
Kind: global function
Param | Type |
---|---|
spy | function |
logName | String |
Shortcut to create a filter PTransform with filter and logName.
Kind: global function
Param | Type |
---|---|
filter | function |
logName | String |
FAQs
Promised out of order transform.
We found that p-transform demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.