MCPcopy Index your code
hub / github.com/angular-ui/ui-router / isError

Function isError

test/angular/1.6/angular.js:796–804  ·  view source on GitHub ↗

* @description * Determines if a reference is an `Error`. * Loosely based on https://www.npmjs.com/package/iserror * * @param {*} value Reference to check. * @returns {boolean} True if `value` is an `Error`.

(value)

Source from the content-addressed store, hash-verified

794 * @returns {boolean} True if `value` is an `Error`.
795 */
796function isError(value) {
797 var tag = toString.call(value);
798 switch (tag) {
799 case '[object Error]': return true;
800 case '[object Exception]': return true;
801 case '[object DOMException]': return true;
802 default: return value instanceof Error;
803 }
804}
805
806/**
807 * @ngdoc function

Callers 3

compileTemplateUrlFunction · 0.70
formatErrorFunction · 0.70
processChecksFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected