1.1.1 • Published 4 years ago

@yomguithereal/helpers v1.1.1

Weekly downloads
164
License
MIT
Repository
github
Last release
4 years ago

Build Status

Yomguithereal's helpers

Miscellaneous helper functions.

Installation

npm install @yomguithereal/helpers

Usage

#.extend

Pushes multiple values to the given array.

It is faster than doing array.push.apply(array, values) and works by first mutating the array's length and then setting the new indices (benchmark proved it is faster than a loop of pushes).

import extend from '@yomguithereal/helpers/extend';

const a = [1, 2, 3];
extend(a, [4, 5, 6]);

a
>>> [1, 2, 3, 4, 5, 6]