1.1.0 • Published 3 years ago

@stiive/meringue v1.1.0

Weekly downloads
-
License
BSD-2-Clause
Repository
-
Last release
3 years ago

Meringue

npm NPM npm

Meringue is a short, sweet extension for JavaScript arrays.

Installation

For browsers:

<!-- Development -->
<script src="//unpkg.com/@stiive/meringue"></script>

<!-- Production (minified) -->
<script src="https://cdn.jsdelivr.net/npm/@stiive/meringue"></script>

For NodeJS:

$ npm install @stiive/meringue

Include it:

require("@stiive/meringue");

Sample Usage

Meringue is simple to use and can be used as a drop-in replacement for normal arrays.

var arr1 = new Meringue();

for (var i = 0; i < 20; i++) {
  arr1.push(i);
}

console.log(arr1) // Meringue [0, 1, 2, ... 19]

Meringue also adds several helpful functions to make managing arrays a breeze.

console.log(arr1.last()); // 19

console.log(arr1.at(-1)); // 19

var arr2 = new Meringue("a", "b", "c", "d", "c", "b", "a");

console.log(arr2.removeCommonElements(["a", "c"], ["d"])); // Meringue ["b", "b"]

console.log(arr2.unique()); // Meringue ["a", "b", "c", "d"]

Documentation

Full documentation can be found at https://meringue.stiive.co.

1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago