Convert character code getters into plain integers.
With npm do:
npm install babel-plugin-precompile-charcodes --save-dev
Convert str.charCodeAt(0)
to a plain integer, useful for parsers/tokenizers.
const at = '@'.charCodeAt(0);
const at = 64;
In your Babel configuration:
{
"plugins": ["precompile-charcodes"]
}
Thanks goes to these wonderful people (emoji key):
Ben Briggs 💻 📖 👀 |
---|
This project follows the all-contributors specification. Contributions of any kind welcome!
MIT © Ben Briggs