Spread syntax (
...) allows an array expression to be expanded in places where elements are expected.The
slice()method returns a shallow copy of a portion of an array into a new array.(c) MDN
🐊Putout plugin convert spread to slice().
npm i @putout/plugin-convert-array-copy-to-slice -D
{
"rules": {
"convert-array-copy-to-slice": "on"
}
}const places = [...items];const places = items.slice();MIT