Gathering detailed insights and metrics for globals
Gathering detailed insights and metrics for globals
Gathering detailed insights and metrics for globals
Gathering detailed insights and metrics for globals
eslint-restricted-globals
A list of confusing globals that should be restricted to be used as globals
@react-spring/shared
Globals and shared modules
jsonify
JSON without touching any globals
confusing-browser-globals
A list of browser globals that are often used by mistake instead of local variables
Global identifiers from different JavaScript environments
npm install globals
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
Node Version
NPM Version
408 Stars
371 Commits
115 Forks
12 Watching
1 Branches
99 Contributors
Updated on 28 Nov 2024
Minified
Minified + Gzipped
JavaScript (99.27%)
TypeScript (0.43%)
Makefile (0.3%)
Cumulative downloads
Total Downloads
Last day
-7.5%
18,586,870
Compared to previous day
Last week
1%
108,439,169
Compared to previous week
Last month
14.5%
444,059,097
Compared to previous month
Last year
22.4%
4,229,291,132
Compared to previous year
Global identifiers from different JavaScript environments
It's just a JSON file, so you can use it in any environment.
This package is used by ESLint 8 and earlier. For ESLint 9 and later, you should depend on this package directly in your ESLint config.
1npm install globals
1import globals from 'globals'; 2 3console.log(globals.browser); 4/* 5{ 6 addEventListener: false, 7 applicationCache: false, 8 ArrayBuffer: false, 9 atob: false, 10 … 11} 12*/
Each global is given a value of true
or false
. A value of true
indicates that the variable may be overwritten. A value of false
indicates that the variable should be considered read-only. This information is used by static analysis tools to flag incorrect behavior. We assume all variables should be false
unless we hear otherwise.
For Node.js this package provides two sets of globals:
globals.nodeBuiltin
: Globals available to all code running in Node.js.
These will usually be available as properties on the globalThis
object and include process
, Buffer
, but not CommonJS arguments like require
.
See: https://nodejs.org/api/globals.htmlglobals.node
: A combination of the globals from nodeBuiltin
plus all CommonJS arguments ("CommonJS module scope").
See: https://nodejs.org/api/modules.html#modules_the_module_scopeWhen analyzing code that is known to run outside of a CommonJS wrapper, for example, JavaScript modules, nodeBuiltin
can find accidental CommonJS references.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
10 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 11/24 approved changesets -- score normalized to 4
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
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
Score
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