valid-error.js 185 B

12345678
  1. "use strict";
  2. var isError = require("./is-error");
  3. module.exports = function (value) {
  4. if (!isError(value)) throw new TypeError(value + " is not an Error object");
  5. return value;
  6. };