From 0bcaa7d1381604933aaf1e0dbd61145efe262593 Mon Sep 17 00:00:00 2001 From: Brian Zengel Date: Sun, 20 Oct 2013 16:07:13 -0400 Subject: [PATCH] added _.isElement definition --- lodash/lodash-tests.ts | 4 +--- lodash/lodash.d.ts | 14 ++++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 151afcc06..c70f3d667 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -595,7 +595,7 @@ result = _.isBoolean(null); result = _.isDate(new Date()); - +result = _.isElement(document.body); var mergeNames = { @@ -675,8 +675,6 @@ _.isEqual(moe, clone); _.isEmpty([1, 2, 3]); _.isEmpty({}); -_.isElement($('body')[0]); - _.isObject({}); _.isObject(1); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 4c11a1c77..144b5457d 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -2374,6 +2374,13 @@ declare module _ { **/ export function isDate(value: any): boolean; + /** + * Checks if value is a DOM element. + * @param value The value to check. + * @return True if the value is a DOM element, else false. + **/ + export function isElement(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 @@ -2603,12 +2610,7 @@ declare module _ { **/ export function isEmpty(object: any): boolean; - /** - * Returns true if object is a DOM element. - * @param object Check if this object is a DOM element. - * @return True if `object` is a DOM element, otherwise false. - **/ - export function isElement(object: any): boolean; + /** * Returns true if value is an Object. Note that JavaScript arrays and functions are objects,