Class: At

@lumjs/core/arrays.add.At(array)

A wrapper class to provide helper methods to Arrays.

Provides wrapped versions of prepend(), append(), before(), after(), and insert().

The methods obviously pass the array argument, so remove it from the argument signature when using the wrapper method. Other than that, the rest of the arguments are the same as the wrapped functions.

Constructor

new At(array)

Build a wrapper around an array.

Parameters:
Name Type Description
array Array

Array to wrap.

Source:

Methods

(static) extend(array) → {Array}

Add wrappers for the helper functions to the Array directly.

WARNING: This is monkey patching the array object instance. If you're okay with that, cool.

Otherwise, use a new ArrayAt object instance instead.

Parameters:
Name Type Description
array Array

Array to add methods to.

Source:
Returns:

The input array

Type
Array

(static) new(array) → {module:@lumjs/core/arrays.ArrayAt}

A static method that calls new ArrayAt(array);

Parameters:
Name Type Description
array Array

Array to wrap

Source:
Returns:

A new instance.

Type
module:@lumjs/core/arrays.ArrayAt