is-error.js 207 B

123456789
  1. 'use strict';
  2. var toString = Object.prototype.toString
  3. , id = toString.call(new Error());
  4. module.exports = function (x) {
  5. return (x && ((x instanceof Error) || (toString.call(x)) === id)) || false;
  6. };