- Notifications
You must be signed in to change notification settings - Fork7.1k
Closed
Labels
Description
Hello!
In 3.10.0:
var arr = [1, 2, 3];var arr2 = _.chain(arr) .slice() .reverse() .value();console.log('arr2: ', arr2); // [3, 2, 1]console.log('arr: ', arr); // [3, 2, 1]// in 3.9.3 and prior to it 'console.log(arr);' would return [1, 2, 3]. The initial array would be untouched.First i'd like to say, that it is unintuitive, undocumented(nothing in the changelog) and it broke a part of our project. Supposing, that the change was intentional(short fusion), the question is: is there a way to clone an array on purpose, considering that_.clone and_.cloneDeep aren't chainable?
Thank you!