@ngard/tiny-flatten

1.0.0 • Public • Published

tiny-flatten

source bundle size build status license

A minimal-weight utility equivalent to lodash.flatten. For when every byte counts!


lodash.flatten bundle size
tiny-flatten bundle size


Syntax

flatten(/* array */)

Parameters

array - An array to flatten

Return

Flattens an array a single level deep.

Example

import { flatten } from '@ngard/tiny-flatten';

const value = flatten([1, [2, 3], [4, [5]]]);
// returns [1, 2, 3, 4, [5]]

Readme

Keywords

Package Sidebar

Install

npm i @ngard/tiny-flatten

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

10 kB

Total Files

8

Last publish

Collaborators

  • ngard