From af6a6531122b53795021b0a2e190d90ef7df4fd6 Mon Sep 17 00:00:00 2001 From: Daniel Furtado Date: Sun, 27 Dec 2015 16:58:55 +0100 Subject: [PATCH] Added _.isMatch function --- underscore/underscore.d.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/underscore/underscore.d.ts b/underscore/underscore.d.ts index 8cf98071b..23646f044 100644 --- a/underscore/underscore.d.ts +++ b/underscore/underscore.d.ts @@ -1387,6 +1387,14 @@ interface UnderscoreStatic { **/ isEmpty(object: any): boolean; + /** + * Returns true if the keys and values in `properties` matches with the `object` properties. + * @param object Object to be compared with `properties`. + * @param properties Properties be compared with `object` + * @return True if `object` has matching keys and values, otherwise false. + **/ + isMatch(object:any, properties:any): boolean; + /** * Returns true if object is a DOM element. * @param object Check if this object is a DOM element. @@ -2326,6 +2334,12 @@ interface Underscore { * @see _.isEmpty **/ isEmpty(): boolean; + + /** + * Wrapped type `object`. + * @see _.isMatch + **/ + isMatch(): boolean; /** * Wrapped type `object`. @@ -3204,6 +3218,12 @@ interface _Chain { * @see _.isEmpty **/ isEmpty(): _Chain; + + /** + * Wrapped type `object`. + * @see _.isMatch + **/ + isMatch(): _Chain; /** * Wrapped type `object`.