babel-plugin-precompile-charcodes

1.1.0 • Public • Published

babel-plugin-precompile-charcodes Build Status NPM version Dependency Status

Convert character code getters into plain integers.

Install

With npm do:

npm install babel-plugin-precompile-charcodes --save-dev

Example

Convert str.charCodeAt(0) to a plain integer, useful for parsers/tokenizers.

Input

const at = '@'.charCodeAt(0);

Output

const at = 64;

Usage

In your Babel configuration:

{
  "plugins": ["precompile-charcodes"]
}

Contributors

Thanks goes to these wonderful people (emoji key):


Ben Briggs

💻 📖 👀 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT © Ben Briggs

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    16
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    16
  • 1.0.0
    10

Package Sidebar

Install

npm i babel-plugin-precompile-charcodes

Weekly Downloads

26

Version

1.1.0

License

MIT

Last publish

Collaborators

  • beneb