madeinfree / babel-plugin-range-operators

For mapping array creates a range from start point to end point inclusive

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Babel Plugin Range Operators

Foreach creates a range from start point to end point inclusive

Installation

npm install babel-plugin-range-operators --dev

Input

'[0...10]'.forEach((index) => {
  console.log(index)
})

Output

[0,1,2,3,4,5,6,7,8,9,10].forEach((index) => {
  console.log(index)
})

Uses

{
  "plugins": ["range-operators"]
}

About

For mapping array creates a range from start point to end point inclusive

License:MIT License


Languages

Language:JavaScript 100.0%