Package Exports
- babel-plugin-transform-charcodes
- babel-plugin-transform-charcodes/lib/index.js
- babel-plugin-transform-charcodes/lib/index.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (babel-plugin-transform-charcodes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
babel-plugin-transform-charcodes
Replace charcodes AOT
Examples
Constants
in:
import * as charcodes from "charcodes"
charcodes.spaceout:
32Functions
in:
import * as charcodes from "charcodes"
(charcodes.isDigit(1))out:
(function isDigit(code) {
return code >= 48 && code <= 57;
}(1))Installation
npm install --save-dev babel-plugin-transform-charcodesUsage
Via .babelrc (Recommended)
.babelrc
{
"plugins": ["transform-charcodes"]
}Via CLI
babel --plugins transform-charcodes script.jsVia Node API
require("@babel/core").transform("code", {
plugins: ["transform-charcodes"]
});