babel-plugin-undefined-to-void
Replace references to `undefined` with `void 0`
Last updated 11 years ago by sebmck .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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                                ...           11 years ago
  • 1.1.5                                ...           11 years ago
  • 1.1.4                                ...           11 years ago
  • 1.1.3                                ...           11 years ago
  • 1.1.2                                ...           11 years ago
  • 1.1.1                                ...           11 years ago
  • 1.1.0                                ...           11 years ago
  • 1.0.3                                ...           11 years ago
  • 1.0.2                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 8
Last Month 9
Dependencies (0)
None
Dev Dependencies (1)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |