JAVASCRIPT   16

valid error js

Guest on 16th July 2022 03:45:11 PM

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

Raw Paste


Login or Register to edit or fork this paste. It's free.