# babel-plugin-transform-for-of-array **Repository Path**: mirrors_ecomfe/babel-plugin-transform-for-of-array ## Basic Information - **Project Name**: babel-plugin-transform-for-of-array - **Description**: for-of statement transformer which only support array or array-like object - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-02-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 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 ``` sh $ npm install babel-plugin-transform-for-of-array --save-dev ``` ## Usage ### Via `.babelrc` (Recommended) **.babelrc** ```json { "plugins": ["transform-for-of-array"] } ``` ### Via CLI ```sh $ babel --plugins transform-for-of-array script.js ``` ### Via Node API ```javascript require("babel-core").transform("code", { plugins: ["transform-for-of-array"] }); ```