
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
babel-plugin-function-composition
Advanced tools
Babel plugin to compose functions with piping using the & operator
This plugin is made to work with point-free (tacit) functional programming by composing functions
over piping. It is inspired by the work of babel-plugin-pipe-operator-curry,
but with a very different purpose, with focus on omitting arguments. I've overloaded the operator &
for that. You
can built more complex functions from simple ones.
import { add, multiply } from 'ramda';
const add5AndMul5 = add(5) & multiply(5);
Turn into
import { add, multiply } from 'ramda';
const add5AndMul5 = (...args) => multiply(5)(add(5)(...args));
If you want to use the original bitwise and operator, you can disable this plugin in
current scope (and it children scopes) using 'no composition
directive.
$ npm install --save-dev babel-plugin-function-composition
.babelrc
(Recommended).babelrc
{
"plugins": ["function-composition"]
}
$ babel --plugins function-composition script.js
require('babel-core').transform('code', {
plugins: ['function-composition']
});
MIT
FAQs
Babel plugin to compose functions with piping using the & operator
We found that babel-plugin-function-composition 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.