Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inDemoInstall

globals

Package Overview
Dependencies
1
Maintainers
4
Versions
102
Issues
File Explorer

Advanced tools

globals

Global identifiers from different JavaScript environments

    13.20.0latest
    Github

Version published
Maintainers
4
Weekly downloads
61,629,698
increased by0.96%

Weekly downloads

Readme

Source

globals

Global identifiers from different JavaScript environments

It's just a JSON file, so use it in any environment.

This package is used by ESLint.

This package 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.

For Node.js this package provides two sets of globals:

When analyzing code that is known to run outside of a CommonJS wrapper, for example, JavaScript modules, nodeBuiltin can find accidental CommonJS references.


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Keywords

FAQs

What is globals?

Global identifiers from different JavaScript environments

Is globals popular?

The npm package globals receives a total of 58,722,071 weekly downloads. As such, globals popularity was classified as popular.

Is globals well maintained?

We found that globals demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 4 open source maintainers collaborating on the project.

Last updated on 28 Jan 2023

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket[email protected]

Product

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc