just
just copied to clipboard
flatten with depth=1 is not properly applied to the first element
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);
@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