globals
    Overview
    Documentation
    Tutorials
    Chat
    Insights
    Code
    Dependencies
    Contributors
    Jobs

globals

Global identifiers from different JavaScript environments

12.0.0  •  Updated 8 months ago  •  by Sindre Sorhus  •  MIT License

Global identifiers from different JavaScript environments

Extracted from JSHint and ESLint and merged.

It’s just a JSON file, so use it in whatever environment you like.

This module no longer accepts new environments. If you need it for ESLint, just create a plugin.

Install

$ npm install globals

Usage

const globals = require('globals');

console.log(globals.browser);
/*
{
	addEventListener: false,
	applicationCache: false,
	ArrayBuffer: false,
	atob: false,
	...
}
*/

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.

Popularity

Maintenance

Development

Last ver 8 months ago
Created 7 years ago
Last commit 4 months ago
9 days between commits

Technology

Node version: 10.16.0
39.9K unpacked

Compliance

MIT License
OSI Approved
0 vulnerabilities

Contributors

73 contributors
Sindre Sorhus
Maintainer, 132 commits, 66 merges, 2 PRs
Nicholas C. Zakas
Maintainer, 15 commits, 10 merges, 5 PRs
Elan Shanker
Maintainer, 11 commits, 5 merges, 3 PRs
Works at Akamai
Kevin Mårtensson
Maintainer, 4 commits, 3 merges
Works at imagemin yeoman
silverwind
7 commits, 7 PRs
Toru Nagashima
Maintainer, 3 commits, 3 PRs

Tags

globals
global
identifiers
variables
vars
jshint
eslint
environments
Openbase helps developers choose among and use millions of open-source packages, so they can build amazing products faster.
FacebookTwitterLinkedIn
© 2020 Devstore, Inc.