mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
18 lines
503 B
JavaScript
18 lines
503 B
JavaScript
import LazyWrapper from './LazyWrapper';
|
|
import getFuncName from './getFuncName';
|
|
import lodash from '../chain/lodash';
|
|
|
|
/**
|
|
* 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);
|
|
return !!funcName && func === lodash[funcName] && funcName in LazyWrapper.prototype;
|
|
}
|
|
|
|
export default isLaziable;
|