Package Exports
- babel-plugin-array-includes
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-array-includes) 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-array-includes
Replaces arr.includes(val)' with
arr.indexOf(val) >= 0`.
Example
In
[1, 2, 3, 5, 8, 13].includes(4);
Out
"use strict";
[1, 2, 3, 5, 8, 13].indexOf(4) >= 0;
Installation
$ npm install babel-plugin-array-includes
Usage
Via .babelrc
(Recommended)
.babelrc
{
"plugins": ["array-includes"]
}
Via CLI
$ babel --plugins array-includes script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["array-includes"]
});