Skip to content
This repository has been archived by the owner on May 11, 2020. It is now read-only.

trexpert/isi-array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

array prototype extenter for node.js

Array prototype Extender.

Export-Methods

Extended Methods

isArray()

isArray(objToTest)

Test an object to be an array

var isiArray = require( 'isi-array' );
var obj1 = undefined;
var obj2 = 'tst';
var obj3 = [];

isiArray.isArray(obj1);
// -> false

isiArray.isArray(obj2);
// -> false

isiArray.isArray(obj3);
// -> true

isFunction()

isFunction(objToTest)

Test an object to be a function

var isiArray = require( 'isi-array' );
isiArray.isFunction(undefined);
// -> false

isiArray.isFunction({});
// -> false

isiArray.isFunction(() => {});
// -> true

isString()

isString(objToTest)

Test an object to be a string

var isiArray = require( 'isi-array' );
isiArray.isString(undefined);
// -> false

isiArray.isString({});
// -> false

isiArray.isString("string to test");
// -> true

firstOrDefault():

firstOrDefault(conditionFunc)

// NEED TO BE DOCUMENTED

each():

each(repeatFunc)

// NEED TO BE DOCUMENTED

take():

take(amount)

// NEED TO BE DOCUMENTED

skip():

skip(amount)

// NEED TO BE DOCUMENTED

filter():

filter(filterFunc)

// NEED TO BE DOCUMENTED

groupBy():

groupBy(filterOrPropertyName, skipUndefined = false)

// NEED TO BE DOCUMENTED

shuffle():

shuffle()

// NEED TO BE DOCUMENTED

contains

.contains(objectOrArray)

[1,2,3].contains(5)
// -> false

[1,2,3].contains(2)
// -> true

[1,2,3].contains([5, 8, 9])
// -> false

[1,2,3].contains([9])
// -> false

[1,2,3].contains([1])
// -> true

[1,2,3].contains([1, 2, 3])
// -> true

pushRange():

pushRange(arr)

// NEED TO BE DOCUMENTED

Version History:

1.0.1

  • published project on github
  • added callable functions to documentation

1.0.0

  • initialize project

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published