目录

babel-plugin-transform-for-of-array

for-of statement transformer which only support array or array-like object.

Difference

es2015 for-of statement support Array, Iterators and Generators. because Iterators and Generators can’t shim easily, we just support Array or Array-like Object.

Installation

$ npm install babel-plugin-transform-for-of-array --save-dev

Usage

.babelrc

{
  "plugins": ["transform-for-of-array"]
}

Via CLI

$ babel --plugins transform-for-of-array script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-for-of-array"]
});
关于
29.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号