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.
converts callback-based functions to Promises and apply currying to arguments
zames
converts callback-based functions to Promises and apply currying to arguments.
npm i zames --save
fn
- functionctx
- contextzames
can take just a function
:
const zames = require('zames');
const promise = zames((a, b, fn) => {
fn(null, a + b);
});
const add = promise('hello ');
add('world').then((a) => {
console.log(a);
// output
'hello world';
});
Or can be used with ctx
as well:
const ctx = {
error: 'hello',
log: function(a, b, fn) {
fn(this.error);
}
}
const withContext = zames(ctx.log, ctx);
withContext(1, 2)
.catch((e) => {
console.error(e.message);
// output
'hello';
});
currify - translate the evaluation of a function that takes multiple arguments into evaluating a sequence of functions, each with a single or more arguments.
fullstore - functional variables.
wraptile - translate the evaluation of a function that takes multiple arguments into evaluating a sequence of 2 functions, each with a any count of arguments.
MIT
FAQs
converts callback-based functions to Promises and apply currying to arguments
The npm package zames receives a total of 21,952 weekly downloads. As such, zames popularity was classified as popular.
We found that zames 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
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.