Socket
Book a DemoInstallSign in
Socket

babel-plugin-transform-globalthis

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-globalthis

Babel plugin for transforming `globalThis`.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
1.4K
-17.62%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-transform-globalthis

Build Status

Babel plugin for transforming globalThis.

Install

npm install babel-plugin-transform-globalthis --save-dev

Usage

Use it via available [plugin activation options][babel-plugins].

For .babelrc file:

{
	"plugins": ["babel-plugin-transform-globalthis"]
}

Then, in your code:

/* Before */

globalThis.becky;

/* After */

// Ommited for simplicity - here goes `globalThis` ponyfill
var _globalThis = {};

_globalThis.becky;

Check test fixtures (actual and expected) for more examples.

Acknowledgments

License

MIT © Ivan Nikolić

Keywords

babel

FAQs

Package last updated on 14 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts