add hw2
This commit is contained in:
		
							
								
								
									
										28
									
								
								node_modules/lodash-es/_isLaziable.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								node_modules/lodash-es/_isLaziable.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | ||||
| import LazyWrapper from './_LazyWrapper.js'; | ||||
| import getData from './_getData.js'; | ||||
| import getFuncName from './_getFuncName.js'; | ||||
| import lodash from './wrapperLodash.js'; | ||||
|  | ||||
| /** | ||||
|  * Checks if `func` has a lazy counterpart. | ||||
|  * | ||||
|  * @private | ||||
|  * @param {Function} func The function to check. | ||||
|  * @returns {boolean} Returns `true` if `func` has a lazy counterpart, | ||||
|  *  else `false`. | ||||
|  */ | ||||
| function isLaziable(func) { | ||||
|   var funcName = getFuncName(func), | ||||
|       other = lodash[funcName]; | ||||
|  | ||||
|   if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { | ||||
|     return false; | ||||
|   } | ||||
|   if (func === other) { | ||||
|     return true; | ||||
|   } | ||||
|   var data = getData(other); | ||||
|   return !!data && func === data[0]; | ||||
| } | ||||
|  | ||||
| export default isLaziable; | ||||
		Reference in New Issue
	
	Block a user
	 nik
					nik