Installations
npm install object-keys
Releases
Unable to fetch releases
Developer
ljharb
Developer Guide
Module System
CommonJS
Min. Node Version
>= 0.4
Typescript Support
No
Node Version
11.13.0
NPM Version
6.7.0
Statistics
45 Stars
344 Commits
17 Forks
7 Watching
1 Branches
7 Contributors
Updated on 29 Aug 2024
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
7,557,041,369
Last day
-7.2%
7,586,364
Compared to previous day
Last week
2.5%
45,634,863
Compared to previous week
Last month
17.6%
180,860,545
Compared to previous month
Last year
10.9%
1,776,039,021
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
object-keys
An Object.keys shim. Invoke its "shim" method to shim Object.keys if it is unavailable.
Most common usage:
1var keys = Object.keys || require('object-keys');
Example
1var keys = require('object-keys'); 2var assert = require('assert'); 3var obj = { 4 a: true, 5 b: true, 6 c: true 7}; 8 9assert.deepEqual(keys(obj), ['a', 'b', 'c']);
1var keys = require('object-keys'); 2var assert = require('assert'); 3/* when Object.keys is not present */ 4delete Object.keys; 5var shimmedKeys = keys.shim(); 6assert.equal(shimmedKeys, keys); 7assert.deepEqual(Object.keys(obj), keys(obj));
1var keys = require('object-keys'); 2var assert = require('assert'); 3/* when Object.keys is present */ 4var shimmedKeys = keys.shim(); 5assert.equal(shimmedKeys, Object.keys); 6assert.deepEqual(Object.keys(obj), keys(obj));
Source
Implementation taken directly from es5-shim, with modifications, including from lodash.
Tests
Simply clone the repo, npm install
, and run npm test
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
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
Found 0/20 approved changesets -- score normalized to 0
Reason
0 commit(s) and 1 issue activity found in the last 90 days -- 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/object-keys/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/object-keys/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/object-keys/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
- Info: jobLevel 'pull-requests' permission set to 'read': .github/workflows/rebase.yml:12
- Warn: jobLevel 'contents' permission set to 'write': .github/workflows/rebase.yml:11
- Warn: no topLevel permission defined: .github/workflows/node-aught.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 11 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