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
acorn-globals
Detect global variables in JavaScript using acorn
confusing-browser-globals
A list of browser globals that are often used by mistake instead of local variables
@jest/globals
rollup-plugin-external-globals
Transform external imports into global variables like output.globals.
Global identifiers from different JavaScript environments
npm install globals
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.6
Supply Chain
83.8
Quality
94.5
Maintenance
100
Vulnerability
100
License
JavaScript (99.02%)
TypeScript (0.37%)
HTML (0.34%)
Makefile (0.27%)
Total Downloads
17,342,209,691
Last Day
7,701,150
Last Week
126,096,493
Last Month
540,093,612
Last Year
4,985,297,398
MIT License
482 Stars
393 Commits
119 Forks
11 Watchers
1 Branches
100 Contributors
Updated on May 31, 2025
Minified
Minified + Gzipped
Latest Version
16.2.0
Package Id
globals@16.2.0
Unpacked Size
186.85 kB
Size
25.69 kB
File Count
6
NPM Version
10.9.2
Node Version
20.19.1
Published on
May 25, 2025
Cumulative downloads
Total Downloads
Last Day
-8.3%
7,701,150
Compared to previous day
Last Week
-7.8%
126,096,493
Compared to previous week
Last Month
4.8%
540,093,612
Compared to previous month
Last Year
32.6%
4,985,297,398
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
10 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
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 12/25 approved changesets -- score normalized to 4
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
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 2025-05-26
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