mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Remove countHolders.
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
/**
|
||||
* 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) {
|
||||
let length = array.length
|
||||
let result = 0
|
||||
|
||||
while (length--) {
|
||||
if (array[length] === placeholder) {
|
||||
++result
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
export default countHolders
|
||||
Reference in New Issue
Block a user