columnify icon indicating copy to clipboard operation
columnify copied to clipboard

Do not mutate the options object

Open panick-carousel opened this issue 2 years ago • 0 comments

The options object is passed in from the user and should not be mutated.

here is one example of this mutation occuring.

To fix it, I suggest doing options = {...options} as the first operation in the function call perhaps ?

An example of where this causes problems is if the objects object comes in frozen, then columnify throws an error.

Thank you for this library - it is very useful and I have used it for years before coming across this minor issue.

panick-carousel avatar Jul 25 '22 03:07 panick-carousel