Arrays.findIndexOf()

Look up the first occurrence of the dictionary matching the specified criteria and return its array index.

Usage

Hover over inputs/exits for more info.

var Arrays = require('machinepack-arrays');


// Look up the first occurrence of the dictionary matching the specified criteria and return its array index.

Arrays.findIndexOf({

array: [ '*' ],

criteria: {},

}).execSync();

Inputs

array required

The array to search in (i.e. "haystack")

[ '*' ]
criteria required

The Lodash-style criteria to use (i.e. "metal detector")

{}

Exits

error

An unexpected error occurred.

notFound

Array does not contain specified item.

success

OK.

8