getify / Functional-Light-JS

Pragmatic, balanced FP in JavaScript. @FLJSBook on twitter.
http://FLJSBook.com
Other
16.6k stars 1.96k forks source link

tweak many usages of `slice()` to spread operator #148

Closed getify closed 6 years ago

getify commented 6 years ago

Variety of usages in Ch4, Ch5, Ch6, Ch7, Ch9, and the fp-helpers.js use slice() with no arguments, to make a shallow copy of an array. The more preferred approach should be with ES6 [...x] instead of x.slice().

Care needs to be taken in this update, as it's widespread enough to affect layout.