Merge pull request #5566 from chrootsu/lodash-isBoolean

lodash: changed _.isBoolean() method
This commit is contained in:
Masahiro Wakame 2015-09-01 02:37:35 +09:00
commit 558bec8917
2 changed files with 23 additions and 12 deletions

View File

@ -1207,6 +1207,12 @@ result = <boolean>_(1).isArray();
result = <boolean>_<any>([]).isArray();
result = <boolean>_({}).isArray();
// _.isBoolean
result = <boolean>_.isBoolean(any);
result = <boolean>_(1).isBoolean();
result = <boolean>_<any>([]).isBoolean();
result = <boolean>_({}).isBoolean();
// _.isDate
result = <boolean>_.isDate(any);
result = <boolean>_(42).isDate();
@ -1479,8 +1485,6 @@ interface FirstSecond {
}
result = <FirstSecond>_.invert({ 'first': 'moe', 'second': 'larry' });
result = <boolean>_.isBoolean(null);
result = <boolean>_.isElement(document.body);
// _.isEqual (alias: _.eq)

27
lodash/lodash.d.ts vendored
View File

@ -6196,6 +6196,23 @@ declare module _ {
isArray(): boolean;
}
//_.isBoolean
interface LoDashStatic {
/**
* Checks if value is classified as a boolean primitive or object.
* @param value The value to check.
* @return Returns true if value is correctly classified, else false.
**/
isBoolean(value?: any): boolean;
}
interface LoDashWrapperBase<T, TWrapper> {
/**
* @see _.isBoolean
*/
isBoolean(): boolean;
}
//_.isDate
interface LoDashStatic {
/**
@ -7080,16 +7097,6 @@ declare module _ {
invert(object: any): any;
}
//_.isBoolean
interface LoDashStatic {
/**
* Checks if value is a boolean value.
* @param value The value to check.
* @return True if the value is a boolean value, else false.
**/
isBoolean(value?: any): boolean;
}
//_.isElement
interface LoDashStatic {
/**