Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
pipe a value through a chain of functions
vv(23)
(function(v) { return v * 2 })
(function(v) { return v + 2 })
(function(v) { console.log(v) }) // 48
node:
$ npm install drainpipe
browser:
$ bower install drainpipe
<script src="/bower_components/drainpipe/drainpipe.js"></script>
vv(x)
Takes in a value and starts a drainpipe chain.
vv(x)(fn[, arg1[, arg2[, ...]]])
Takes in a function and optional extra arguments, calls the function with the current value in the drainpipe chain and stores its result as the new value in the drainpipe chain.
function add(a, b) {
return a + b
}
vv(23)
(add, 1)
(add, 3)
(function(v) { console.log(v) }) // 27
vv(x)()
Returns the current value in the drainpipe chain
var x = vv(23)
(function(v) { return v * 2 })
(function(v) { return v + 2 })
()
console.log(x) // 48
FAQs
utility for piping a value through a chain of functions
The npm package drainpipe receives a total of 12 weekly downloads. As such, drainpipe popularity was classified as not popular.
We found that drainpipe demonstrated a not healthy version release cadence and project activity because the last version was released 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.