mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
added _.isRegExp definition
This commit is contained in:
@@ -647,6 +647,8 @@ result = <boolean>_.isPlainObject(new Stooge('moe', 40));
|
||||
result = <boolean>_.isPlainObject([1, 2, 3]);
|
||||
result = <boolean>_.isPlainObject({ 'name': 'moe', 'age': 40 });
|
||||
|
||||
result = <boolean>_.isRegExp(/moe/);
|
||||
|
||||
var mergeNames = {
|
||||
'stooges': [
|
||||
{ 'name': 'moe' },
|
||||
|
||||
Vendored
+7
-7
@@ -2474,6 +2474,13 @@ declare module _ {
|
||||
**/
|
||||
export function isPlainObject(value: any): boolean;
|
||||
|
||||
/**
|
||||
* Checks if value is a regular expression.
|
||||
* @param value The value to check.
|
||||
* @return True if the value is a regular expression, else false.
|
||||
**/
|
||||
export function isRegExp(value: any): boolean;
|
||||
|
||||
/**
|
||||
* Recursively merges own enumerable properties of the source object(s), that don't resolve
|
||||
* to undefined into the destination object. Subsequent sources will overwrite property
|
||||
@@ -2694,13 +2701,6 @@ declare module _ {
|
||||
**/
|
||||
export function isString(object: any): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if object is a RegExp.
|
||||
* @param object Check if this object is a RegExp.
|
||||
* @return True if `object` is a RegExp, otherwise false.
|
||||
**/
|
||||
export function isRegExp(object: any): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if value is undefined.
|
||||
* @param object Check if this object is undefined.
|
||||
|
||||
Reference in New Issue
Block a user