flatten.js 284 B

1234567
  1. import _flatten from './_flatten.js';
  2. // Flatten out an array, either recursively (by default), or up to `depth`.
  3. // Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.
  4. export default function flatten(array, depth) {
  5. return _flatten(array, depth, false);
  6. }