just icon indicating copy to clipboard operation
just copied to clipboard

flatten with depth=1 is not properly applied to the first element

Open bd82 opened this issue 1 year ago • 1 comments

image

Expected result would be [1, 2, 3] But the actual is [[1], 2, 3]

Code snippet:

const flatten = require('just-flatten-it')

flatten([[1], [2], 3], 1);

bd82 avatar Jul 01 '23 17:07 bd82

@angus-c I opened a PR for the fix, please let me know your thoughts on this - https://github.com/angus-c/just/pull/577

superhit0 avatar Feb 04 '24 06:02 superhit0