diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index d7d4b6f71..cfb53c128 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -1069,6 +1069,10 @@ result = _({}).isMatch({}); result = _({}).isMatch({}, testIsMatchCustiomizerFn); result = _({}).isMatch({}, testIsMatchCustiomizerFn, {}); +// _.isNative +result = _.isNative(Array.prototype.push); +result = _(Array.prototype.push).isNative(); + // _.lt result = _.lt(1, 2); result = _(1).lt(2); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index acfa93dec..30f4d0e61 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -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 { + /** + * see _.isNative + */ + isNative(): boolean; + } + //_.lt interface LoDashStatic { /**