Gathering detailed insights and metrics for es6-promisify
Gathering detailed insights and metrics for es6-promisify
Gathering detailed insights and metrics for es6-promisify
Gathering detailed insights and metrics for es6-promisify
npm install es6-promisify
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.1
Supply Chain
91
Quality
75.9
Maintenance
100
Vulnerability
100
License
JavaScript (99.46%)
Shell (0.54%)
Total Downloads
1,927,573,585
Last Day
776,563
Last Week
4,832,676
Last Month
24,239,415
Last Year
205,572,601
MIT License
524 Stars
108 Commits
31 Forks
8 Watchers
5 Branches
7 Contributors
Updated on May 22, 2025
Latest Version
7.0.0
Package Id
es6-promisify@7.0.0
Size
2.67 kB
NPM Version
6.14.13
Node Version
14.8.0
Published on
May 26, 2021
Cumulative downloads
Total Downloads
Last Day
20.4%
776,563
Compared to previous day
Last Week
-4.4%
4,832,676
Compared to previous week
Last Month
26.1%
24,239,415
Compared to previous month
Last Year
-2.8%
205,572,601
Compared to previous year
Converts callback-based functions to Promises, using a boilerplate callback function.
Install with npm
1npm install es6-promisify
1const {promisify} = require("es6-promisify"); 2 3// Convert the stat function 4const fs = require("fs"); 5const stat = promisify(fs.stat); 6 7// Now usable as a promise! 8try { 9 const stats = await stat("example.txt"); 10 console.log("Got stats", stats); 11} catch (err) { 12 console.error("Yikes!", err); 13}
1const {promisify} = require("es6-promisify"); 2 3// Create a promise-based version of send_command 4const redis = require("redis").createClient(6379, "localhost"); 5const client = promisify(redis.send_command.bind(redis)); 6 7// Send commands to redis and get a promise back 8try { 9 const pong = await client.ping(); 10 console.log("Got", pong); 11} catch (err) { 12 console.error("Unexpected error", err); 13} finally { 14 redis.quit(); 15}
1const {promisify} = require("es6-promisify"); 2 3function test(cb) { 4 return cb(undefined, 1, 2, 3); 5} 6 7// Create promise-based version of test 8test[promisify.argumentNames] = ["one", "two", "three"]; 9const multi = promisify(test); 10 11// Returns named arguments 12const result = await multi(); 13console.log(result); // {one: 1, two: 2, three: 3}
1const {promisify} = require("es6-promisify"); 2 3// Now uses Bluebird 4promisify.Promise = require("bluebird"); 5 6const test = promisify(cb => cb(undefined, "test")); 7const result = await test(); 8console.log(result); // "test", resolved using Bluebird
Test with tape
1$ npm test
Published under the MIT License.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
Found 0/26 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
14 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More