babel-plugin-transform-globalthis

1.0.0 • Public • Published

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ć

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    2,959
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    2,959

Package Sidebar

Install

npm i babel-plugin-transform-globalthis

Weekly Downloads

2,585

Version

1.0.0

License

MIT

Unpacked Size

15.2 kB

Total Files

10

Last publish

Collaborators

  • niksy