isi-array

1.0.12 • Public • Published

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

notIn():

notIn()

// 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

count():

count([condition])

// NEED TO BE DOCUMENTED

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.120latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.120
1.0.110
1.0.100
1.0.90
1.0.80
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10

Package Sidebar

Install

npm i isi-array

Weekly Downloads

0

Version

1.0.12

License

ISC

Unpacked Size

9.5 kB

Total Files

3

Last publish

Collaborators

  • trexpert