.
This commit is contained in:
		
							
								
								
									
										21
									
								
								qwen/nodejs/node_modules/lodash/_countHolders.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								qwen/nodejs/node_modules/lodash/_countHolders.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
/**
 | 
			
		||||
 * 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;
 | 
			
		||||
		Reference in New Issue
	
	Block a user