@avidian/extras
v1.0.1
Published
Extra features on native objects.
Downloads
18
Readme
@avidianity/extras
Extra features on native objects
Installation
npm:
npm install @avidian/extras
yarn:
yarn add @avidian/extras
Usage
Arrays
const data = [1, 2, 3];
const randomValue = data.random();
const first = data.first();
const last = data.last();
// Flatten
const data = [1, 2, 3, [4, 5]];
// [1, 2, 3, 4, 5]
const flattened = data.flatten()