Array.from()
. Merged to @putout/plugin-for-of
.
Install
npm i @putout/plugin-remove-useless-array-from
Rule
{
"rules": {
"remove-useless-array-from": "on"
}
}
❌ Example of incorrect code
for (const x of Array.from(y)) {}
✅ Example of correct code
for (const x of y) {}
License
MIT