Détail du package

babel-plugin-transform-globalthis

niksy5.6kMIT1.0.0

Babel plugin for transforming globalThis.

babel, globalthis, plugin, transform

readme

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ć

changelog