Closed harrysolovay closed 5 years ago
I don't think this feature fits into this module. The goal of the module is to ensure a value is an array, not that it's a flat array. You can actually do this pretty easily now natively with [1, [2, [3]]].flat(Infinity)
.
Sorry my Prettier did a number on your semi-colons. I added an optional 2nd parameter that flattens deeply-nested arrays into 1D. If you don't like this as a feature, t'sall good :) that being said, I think this non-breaking feature would come in handy.