babel-plugin-default-identifier

0.0.3 • Public • Published

babel-plugin-default-identifier

A Babel plugin to wrap the "default" identifier with apostrophes

This plugin is useful for legacy browsers or tools that treat "default" identifier as a keyword

Example

Input src/simple/actual.js

var x = {
  default: 0
};

Output dist/simple/actual.js

'use strict';
 
var x = {
  'default': 0
};

Getting started

Installation

$ npm install babel-plugin-default-identifier

Usage

Via .babelrc (Recommended)

{
  "plugins": ["default-identifier"]
}

Running tests

Run mocha tests with npm test

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    195
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    195
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i babel-plugin-default-identifier

Weekly Downloads

195

Version

0.0.3

License

MIT

Last publish

Collaborators

  • igor-dv