add hw2
This commit is contained in:
		
							
								
								
									
										21
									
								
								node_modules/lodash-es/_countHolders.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								node_modules/lodash-es/_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; | ||||
| } | ||||
|  | ||||
| export default countHolders; | ||||
		Reference in New Issue
	
	Block a user
	 nik
					nik