2.1.1 β’ Published 1 year ago
@putout/plugin-remove-useless-array-from v2.1.1
@putout/plugin-remove-useless-array-from
πPutout plugin adds ability to remove useless 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