Urara-Blog/node_modules/.pnpm-store/v3/files/cf/2feaf9953cfe7dac837938578f031ff6810c301f0cd5fd64a5ca7781eaba96378e2ed2d11541afb38826d051e7640ce9e39f53f2de3091084592fc816c96ec
2022-08-14 01:14:53 +08:00

28 lines
712 B
Text

var LazyWrapper = require('./_LazyWrapper'),
getData = require('./_getData'),
getFuncName = require('./_getFuncName'),
lodash = require('./wrapperLodash');
/**
* 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];
}
module.exports = isLaziable;