Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
utility for piping a value through a chain of functions
vv(23)
(v => v * 2)
(v => v + 2)
(v => console.log(v))
// =>
48
vv(x)
Takes in a value and starts a 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)
(v => console.log(v)) // 27
vv(x)()
Returns the current value in the drainpipe chain
var x = vv(23)
(v => v * 2)
(v => v + 2)
()
console.log(x) // 48
You can use this library as the npm package drainpipe
:
npm i drainpipe
# or
yarn add drainpipe
It can be used in both es-module-aware and commonjs bundlers/environments.
// es module
import vv from 'drainpipe'
// commonjs
const vv = require('drainpipe')
It can also be used a <script>
:
<script
crossorigin
src="https://unpkg.com/drainpipe/dist/umd/drainpipe.js"
></script>
<script>
vv(23)(v => console.log(v))
</script>
FAQs
utility for piping a value through a chain of functions
The npm package drainpipe receives a total of 0 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.