All Downloads are FREE. Search and download functionalities are using the official Maven repository.

node_modules.lodash._countHolders.js Maven / Gradle / Ivy

There is a newer version: 3.3.1
Show newest version
/**
 * 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;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy