Sha256: f98b725ea04a2979f0ad29afff6794ec83ec420342bae041934a829244dacb96
Contents?: true
Size: 487 Bytes
Versions: 277
Compression:
Stored size: 487 Bytes
Contents
var eq = require('./eq'); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf;
Version data entries
277 entries across 275 versions & 31 rubygems