is-error.js 224 B

1234567
  1. "use strict";
  2. var objToString = Object.prototype.toString, id = objToString.call(new Error());
  3. module.exports = function (value) {
  4. return (value && (value instanceof Error || objToString.call(value) === id)) || false;
  5. };