diff options
| author | Misko Hevery | 2011-11-04 12:33:01 -0700 |
|---|---|---|
| committer | Misko Hevery | 2011-11-14 20:31:14 -0800 |
| commit | a87f2fb9e4d65ac5d260e914b5e31aa0e0f47b2c (patch) | |
| tree | 93e69475affd24ef5b16c68e47d1476bc37787a7 /src/Angular.js | |
| parent | c27aba4354c69c4a67fab587a59a8079cc9edc91 (diff) | |
| download | angular.js-a87f2fb9e4d65ac5d260e914b5e31aa0e0f47b2c.tar.bz2 | |
refactor(mock): moved mocks into its own module
Diffstat (limited to 'src/Angular.js')
| -rw-r--r-- | src/Angular.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/Angular.js b/src/Angular.js index fcb13881..af441e1c 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -426,6 +426,17 @@ function trim(value) { return isString(value) ? value.replace(/^\s*/, '').replace(/\s*$/, '') : value; } +/** + * @ngdoc function + * @name angular.isElement + * @function + * + * @description + * Determines if a reference is a DOM element (or wrapped jQuery element). + * + * @param {*} value Reference to check. + * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element). + */ function isElement(node) { return node && (node.nodeName // we are a direct element @@ -1012,7 +1023,7 @@ function assertArg(arg, name, reason) { function assertArgFn(arg, name) { assertArg(isFunction(arg), name, 'not a function, got ' + - (typeof arg == 'object' ? arg.constructor.name : typeof arg)); + (typeof arg == 'object' ? arg.constructor.name || 'Object' : typeof arg)); return arg; } @@ -1034,6 +1045,7 @@ function publishExternalAPI(angular){ 'isFunction': isFunction, 'isObject': isObject, 'isNumber': isNumber, + 'isElement': isElement, 'isArray': isArray, 'version': version, 'isDate': isDate, |
