Merge pull request #5381 from chrootsu/lodash-isTypedArray

lodash: added _.isTypedArray() method
This commit is contained in:
Masahiro Wakame
2015-08-17 23:21:15 +09:00
2 changed files with 21 additions and 0 deletions
+4
View File
@@ -1088,6 +1088,10 @@ result = <boolean>_(undefined).isNaN();
result = <boolean>_.isNative(Array.prototype.push);
result = <boolean>_(Array.prototype.push).isNative();
// _.isTypedArray
result = <boolean>_.isTypedArray([]);
result = <boolean>_([]).isTypedArray();
// _.lt
result = <boolean>_.lt(1, 2);
result = <boolean>_(1).lt(2);
+17
View File
@@ -5944,6 +5944,23 @@ declare module _ {
isNative(): boolean;
}
//_.isTypedArray
interface LoDashStatic {
/**
* Checks if value is classified as a typed array.
* @param value The value to check.
* @return Returns true if value is correctly classified, else false.
*/
isTypedArray(value: any): boolean;
}
interface LoDashWrapperBase<T, TWrapper> {
/**
* see _.isTypedArray
*/
isTypedArray(): boolean;
}
//_.lt
interface LoDashStatic {
/**