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.
async-handlers
Advanced tools
Function factories for performing synchronous operations after asynchronous operations
Function factories for performing synchronous operations after asynchronous operations.
f1 = function (callback) {
asyncOperation(function(err, result) {
if (err) {
callback(err);
} else {
callback(null, syncOperation(result);
}
}
}
// is equivalent to
var asyncHandlers = require('async-handlers')
f1 = function (callback) {
handler = asyncHandlers.transform(syncOperation, callback);
asyncOperation(handler);
}
Returns a function with the signature (err)
.
When called with an error, passes it to the callback.
Otherwise executes callback with (null, value)
.
Returns a function with the signature (err)
.
When called with an error, prints the error in red to stderr
and exits with status 1.
Otherwise does nothing.
Returns a function with the signature (err, result)
.
When called with an error, passes it to the callback.
Otherwise executes callback with (null, result[key])
.
Returns a function with the signature (err, args...)
.
When error is a string, prepends prefix to it if and passes it to the callback.
When error is an object with a message property, prepends prefix to its message and passes it to the callback.
Otherwise passes all arguments to the callback.
Note: the prefix will only be prepended if not already present.
Returns a function with the signature (err, result)
.
When called with an error, passes it to the callback.
Otherwise executes callback with (null, fn(result))
.
1.3.0 (2015-07-28)
constant
FAQs
Function factories for performing synchronous operations after asynchronous operations
The npm package async-handlers receives a total of 11 weekly downloads. As such, async-handlers popularity was classified as not popular.
We found that async-handlers 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.