From a734d7bd3ca512dfbae9deae9a9c285a13c1ce5e Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Sun, 21 Feb 2016 03:15:23 +0500 Subject: [PATCH] lodash: added _.isBuffer --- lodash/lodash-tests.ts | 20 ++++++++++++++++++++ lodash/lodash.d.ts | 25 +++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 8366f75fca..476f029798 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -6371,6 +6371,26 @@ module TestIsBoolean { } } +// _.isBuffer +module TestIsBuffer { + { + let result: boolean; + + result = _.isBuffer(any); + result = _(1).isBuffer(); + result = _([]).isBuffer(); + result = _({}).isBuffer(); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _(1).chain().isBuffer(); + result = _([]).chain().isBuffer(); + result = _({}).chain().isBuffer(); + } +} + // _.isDate module TestIsBoolean { { diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index b77598f138..f9eb8ef48c 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -11159,6 +11159,31 @@ declare module _ { isBoolean(): LoDashExplicitWrapper; } + //_.isBuffer + interface LoDashStatic { + /** + * Checks if value is a buffer. + * + * @param value The value to check. + * @return Returns true if value is a buffer, else false. + */ + isBuffer(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isBuffer + */ + isBuffer(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isBuffer + */ + isBuffer(): LoDashExplicitWrapper; + } + //_.isDate interface LoDashStatic { /**