lodash: added _.isNative() method

This commit is contained in:
Ilya Mochalov
2015-08-13 21:29:19 +05:00
parent e95958ac84
commit 61f1d482f2
2 changed files with 21 additions and 0 deletions
+4
View File
@@ -1069,6 +1069,10 @@ result = <boolean>_({}).isMatch({});
result = <boolean>_({}).isMatch({}, testIsMatchCustiomizerFn);
result = <boolean>_({}).isMatch({}, testIsMatchCustiomizerFn, {});
// _.isNative
result = <boolean>_.isNative(Array.prototype.push);
result = <boolean>_(Array.prototype.push).isNative();
// _.lt
result = <boolean>_.lt(1, 2);
result = <boolean>_(1).lt(2);
+17
View File
@@ -5888,6 +5888,23 @@ declare module _ {
isMatch(source: Object, customizer?: isMatchCustomizer, thisArg?: any): boolean;
}
//_.isNative
interface LoDashStatic {
/**
* Checks if value is a native function.
* @param value The value to check.
* @retrun Returns true if value is a native function, else false.
*/
isNative(value: any): boolean;
}
interface LoDashWrapperBase<T, TWrapper> {
/**
* see _.isNative
*/
isNative(): boolean;
}
//_.lt
interface LoDashStatic {
/**