Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

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

Notifications You must be signed in to change notification settings

igor-dv/babel-plugin-default-identifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published