Polyfill/shim for util.promisify in node versions < v8
Installations
npm install util.promisify
Releases
Unable to fetch releases
Developer
ljharb
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
20.0.0
NPM Version
9.6.4
Statistics
126 Stars
77 Commits
15 Forks
5 Watching
1 Branches
5 Contributors
Updated on 08 Aug 2024
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
3,875,232,945
Last day
-5.2%
2,168,120
Compared to previous day
Last week
3.7%
11,905,809
Compared to previous week
Last month
22.2%
46,553,626
Compared to previous month
Last year
-29.3%
529,463,072
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
util.promisify
Polyfill for util.promisify in node versions < v8
node v8.0.0 added support for a built-in util.promisify
: https://github.com/nodejs/node/pull/12442/
This package provides the built-in util.promisify
in node v8.0.0 and later, and a replacement in other environments.
Usage
Direct
1const promisify = require('util.promisify'); 2// Use `promisify` just like the built-in method on `util`
Shim
1require('util.promisify/shim')(); 2// `util.promisify` is now defined 3const util = require('util'); 4// Use `util.promisify`
Note: this package requires a native ES5 environment, and for Promise
to be globally available. It will throw upon requiring it if these are not present.
Promisifying modules
If you want to promisify a whole module, like the fs
module, you can use util.promisify-all
.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/ljharb/.github/SECURITY.md:1
- Info: Found linked content: github.com/ljharb/.github/SECURITY.md:1
- Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy
- Info: Found text in security policy: github.com/ljharb/.github/SECURITY.md:1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 2/25 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rebase.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/ljharb/util.promisify/rebase.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/rebase.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/ljharb/util.promisify/rebase.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/require-allow-edits.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/ljharb/util.promisify/require-allow-edits.yml/main?enable=pin
- Info: 0 out of 1 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 2 third-party GitHubAction dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: jobLevel 'contents' permission set to 'write': .github/workflows/rebase.yml:11
- Info: jobLevel 'pull-requests' permission set to 'read': .github/workflows/rebase.yml:12
- Warn: no topLevel permission defined: .github/workflows/node-aught.yml:1
- Warn: no topLevel permission defined: .github/workflows/node-noproto.yml:1
- Warn: no topLevel permission defined: .github/workflows/node-pretest.yml:1
- Warn: no topLevel permission defined: .github/workflows/node-tens.yml:1
- Info: topLevel 'contents' permission set to 'read': .github/workflows/rebase.yml:6
- Warn: no topLevel permission defined: .github/workflows/require-allow-edits.yml:1
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 8 are checked with a SAST tool
Score
4.4
/10
Last Scanned on 2024-11-18
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