Detalhes do pacote

just-flatten-it

angus-c28.2kMIT5.2.0

return a flattened array

array, flatten, no-dependencies, just

readme (leia-me)

just-flatten-it

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

🍦 Try it

npm install just-flatten-it
yarn add just-flatten-it

Return a flattened array

import flatten from 'just-flatten-it';

flatten([[1, [2, 3]], [[4, 5], 6, 7, [8, 9]]]);
// [1, 2, 3, 4, 5, 6, 7, 8, 9]

flatten([[1, [2, 3]], [[4, 5], 6, 7, [8, 9]]], 1);
// [1, [2, 3], [[4, 5], 6, 7, [8, 9]]]

changelog (log de mudanças)

just-flatten-it

5.2.0

Minor Changes

  • Rename node module .js -> .cjs

5.1.2

Patch Changes

  • Type improvements

5.1.1

Patch Changes

  • fix: reorder exports to set default last #488

5.1.0

Minor Changes

  • package.json updates to fix #467 and #483