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

Function isError

test/angular/1.7/angular.js:771–779  ·  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

769 * @returns {boolean} True if `value` is an `Error`.
770 */
771function isError(value) {
772 var tag = toString.call(value);
773 switch (tag) {
774 case '[object Error]': return true;
775 case '[object Exception]': return true;
776 case '[object DOMException]': return true;
777 default: return value instanceof Error;
778 }
779}
780
781/**
782 * @ngdoc function

Callers 3

compileTemplateUrlFunction · 0.70
formatErrorFunction · 0.70
processChecksFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected