2.0.2 • Published 4 years ago

arrayer v2.0.2

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

npm (scoped)

Arrayer

Some handy array-related functions.

Functions

equal(arr1, arr2) ⇒ boolean

Compare two arrays and check if they are the same.

Kind: global function Returns: boolean - Whether they are the same or not. Author: ThePhoDit

ParamTypeDescription
arr1Array.<any>First array.
arr2Array.<any>Second array.

arrange(...arrays) ⇒ Array.<any>

Arrange various arrays into a single one.

Kind: global function Returns: Array.<any> - Array with all values. Author: ThePhoDit

ParamTypeDescription
...arraysArray.<any>All arrays to arrange.

remove(item, arr) ⇒ Array.<any>

Removes the first match of the specified item.

Kind: global function Returns: Array.<any> - Array without the removed item. Author: ThePhoDit

ParamTypeDescription
itemstring | number | booleanThe item to remove.
arrArray.<(string|number|boolean)>The array from where the item is removed.

removeAll(item, arr) ⇒ Array.<any>

Removes all matches of the specified item.

Kind: global function Returns: Array.<any> - Array without the removed items. Author: ThePhoDit

ParamTypeDescription
itemstring | number | booleanThe item to remove.
arrArray.<(string|number|boolean)>The array from where the item is removed.

longestString(arr) ⇒ Object

Get the longest string of an array.

Kind: global function Returns: Object - The word and the length of it. Author: ThePhoDit

ParamTypeDescription
arrArray.<string>Array with different words.

highestNumber(arr) ⇒ number

Get the highest value of a numeric array.

Kind: global function Returns: number - The highest number. Author: ThePhoDit

ParamTypeDescription
arrArray.<number>Array with different numbers.
2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago