包详细信息

@yomguithereal/helpers

Yomguithereal295.7kMIT1.1.1

Miscellaneous helper functions.

自述文件

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]