babel-plugin-undefined-to-void
Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
Last updated 11 years ago by sebmck .
MIT · Original npm · Tarball · package.json
$ npm install babel-plugin-undefined-to-void 
SYNC missed versions from official npm registry.

babel-plugin-undefined-to-void

Some JavaScript implementations allow undefined to be overwritten, this may lead to peculiar bugs that are extremely hard to track down.

This plugin transforms undefined into void 0 which returns undefined regardless of if it's been reassigned.

Example

In

foo === undefined;

Out

foo === void 0;

Installation

$ npm install babel-plugin-undefined-to-void

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["undefined-to-void"]
}

Via CLI

$ babel --plugins undefined-to-void script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["undefined-to-void"]
});

Current Tags

  • 1.1.6                                ...           latest (11 years ago)

9 Versions

  • 1.1.6 [deprecated]           ...           11 years ago
  • 1.1.5 [deprecated]           ...           11 years ago
  • 1.1.4 [deprecated]           ...           11 years ago
  • 1.1.3 [deprecated]           ...           11 years ago
  • 1.1.2 [deprecated]           ...           11 years ago
  • 1.1.1 [deprecated]           ...           11 years ago
  • 1.1.0 [deprecated]           ...           11 years ago
  • 1.0.3 [deprecated]           ...           11 years ago
  • 1.0.2 [deprecated]           ...           11 years ago
Maintainers (1)
Downloads
Total 19
Today 0
This Week 0
This Month 19
Last Day 0
Last Week 9
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE