
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
Promises is coming in the new ES6 spec. This excellent article should convince you to use it.
A lot of libraries today still takes callback arguments rather than returning promises. Voucher will wrap the calls and give you a promise to work with. Easy.
npm install voucher
var crypto = require('crypto');
var voucher = require('voucher');
voucher(crypto.pseudoRandomBytes, 12).then(function(randomBytesBuffer) {
console.log(randomBytesBuffer.toString('hex'));
});
var fs = require('fs');
var voucher = require('voucher');
voucher(fs.readFile, '/etc/passwd', { encoding: 'utf8' }).then(function(content) {
console.log(content); // Logs the contents of '/etc/passwd'
}).catch(function(error) {
console.log('Something went wrong when reading file:', error);
});
error as its first argument.All NodeJS native functions works well. For instance, fs.readFile takes a
filename parameter, then an optional options object and then the callback function.
The callback function receives two parameters, first err which indicates if
anything went wrong, then the result of the readFile operation.
FAQs
Convert asynchronous function calls with callbacks to es6 promises
The npm package voucher receives a total of 0 weekly downloads. As such, voucher popularity was classified as not popular.
We found that voucher 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
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.