valid-error.js 185B

123456789
  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. };