1 | import LazyWrapper from './_LazyWrapper';
|
2 | import getData from './_getData';
|
3 | import getFuncName from './_getFuncName';
|
4 | import lodash from './wrapperLodash';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | function isLaziable(func) {
|
15 | var funcName = getFuncName(func),
|
16 | other = lodash[funcName];
|
17 |
|
18 | if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
|
19 | return false;
|
20 | }
|
21 | if (func === other) {
|
22 | return true;
|
23 | }
|
24 | var data = getData(other);
|
25 | return !!data && func === data[0];
|
26 | }
|
27 |
|
28 | export default isLaziable;
|