
Security News
OpenGrep Restores Fingerprinting in JSON and SARIF Outputs
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
functional composition sugar
var plumb = require('plumb')
var reverseString = plumb(
plumb.invoke('split')
plumb.invoke('reverse')
plumb.invoke('join','')
)
// => Function
reverseString('hello')
// => "olleh"
Using jsig notation
plumb(...fns: Function) => (val: Value) => Value
Reutrns a function composing each of the argument functions in order. The return value of each function is used as the argument for each successive function.
plumb.pipe(val: Value, ...fns: Function) => Value
Immediately invoke a composition of functions fns
on the value val
. It helps me to think about fns
as a crazy pachinko machine and val
as the ball going in.
Equivalent to plumb(fns)(val)
plumb.invoke(methodName: String, ...args?: Value) => Function
Creates a function which invokes a method on an object, optionally with fixed arguments.
Example:
plumb.invoke('foo','bar')
returns the equivalent of
function callFoo(obj) {
return obj.foo('bar')
}
plumb.tap(fn: Function) => (Value) => Value
Create a function which passes a value through (identity) and calls a function fn
with that value.
Example:
var log = plumb.tap(function (x) { console.log(x)})
log(10)
// => 10
// side effect: console.log(10) was called
$ npm install plumb
From project root:
$ npm install
$ npm test
jden jason@denizac.org
MIT. (c) 2013 Agile Diagnosis hello@agilediagnosis.com See LICENSE.md
"...and visions of sugarplums danced in their heads"
FAQs
functional composition sugar
The npm package plumb receives a total of 8,673 weekly downloads. As such, plumb popularity was classified as popular.
We found that plumb 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
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.