Sha256: dca76f5213ffeddd57a87db1babf85b64e4295710d2c64b9a15830f07ae846b8
Contents?: true
Size: 469 Bytes
Versions: 276
Compression:
Stored size: 469 Bytes
Contents
/** * Gets the number of `placeholder` occurrences in `array`. * * @private * @param {Array} array The array to inspect. * @param {*} placeholder The placeholder to search for. * @returns {number} Returns the placeholder count. */ function countHolders(array, placeholder) { var length = array.length, result = 0; while (length--) { if (array[length] === placeholder) { ++result; } } return result; } module.exports = countHolders;
Version data entries
276 entries across 274 versions & 30 rubygems