12345678910111213141516171819202122232425262728 |
- var LazyWrapper = require('./_LazyWrapper'),
- getData = require('./_getData'),
- getFuncName = require('./_getFuncName'),
- lodash = require('./wrapperLodash');
- 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;
|