Big update!Introducing GitHub Bot Commands. Learn more
Socket
BlogLoveLog in
Book a demo

globals

Package Overview
Dependencies
1
Maintainers
4
Versions
99
Issues
File Explorer

Advanced tools

globals

Global identifiers from different JavaScript environments

    13.17.0latest

Version published
Maintainers
4
Weekly downloads
58,624,927
increased by3.53%

Weekly downloads

Changelog

Source

  • Add missing events to browser, worker, service worker environments (#192) 0bfae5d
  • Add TransformStream for browser (#193) 972bfd9

https://github.com/sindresorhus/globals/compare/v13.16.0...v13.17.0

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 56,230,951 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 21 Jul 2022
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc