array-control

0.2.0 • Public • Published

Array-Control

array-control will extend Array.prototype with these useful functions


Array::copy()
Array::copyRange() // copy array for given range (from,length)
Array::equals(array) // check if content of two arrays are equal

Array::hasObject(object)
Array::hasAnyOfObjects(object)
Array::hasAllOfObjects(object)

Array::addObject(object)
Array::addObjects(objects)
Array::insertObject(object,index)

Array::removeObject(object) // removes ALL occurencies of object
Array::removeObjects(objects) // removes ALL occurencies of objects

Array::removeFirstObject(object)
Array::removeLastObject(object)

Array::replaceObject(object,index)

For usage examples see tests.

Package Sidebar

Install

npm i array-control

Weekly Downloads

18

Version

0.2.0

License

none

Last publish

Collaborators

  • jakub.knejzlik