Socket
Socket
Sign inDemoInstall

httperrors

Package Overview
Dependencies
1
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.0 to 2.3.0

2

dist/HttpError.js

@@ -1,1 +0,1 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.HttpError=e()}}(function(){var e;return function t(e,r,o){function n(i,u){if(!r[i]){if(!e[i]){var d="function"==typeof require&&require;if(!u&&d)return d(i,!0);if(a)return a(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var f=r[i]={exports:{}};e[i][0].call(f.exports,function(t){var r=e[i][1][t];return n(r?r:t)},f,f.exports,t,e,r,o)}return r[i].exports}for(var a="function"==typeof require&&require,i=0;i<o.length;i++)n(o[i]);return n}({1:[function(e,t,r){function o(e,t,r){if(e=+e,!(400>e)){var o=t.replace(/ ([a-z])/gi,function(e,t){return t.toUpperCase()}).replace(/[^a-z]/gi,""),a=n({statusCode:e,status:e,name:o,http:!0,message:"HTTP "+e+" "+t},r||i.HttpError);return i[o]=a,i[e]||(i[e]=a),a}}var n=e("createerror"),a={400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},i=t.exports=n({name:"HttpError",preprocess:function(e){if(!(e instanceof i)){if("number"==typeof e&&!i.hasOwnProperty(e))return{statusCode:e};if(("string"==typeof e||"number"==typeof e)&&i.hasOwnProperty(e))return new i[e](e);if(e&&e.code&&i.hasOwnProperty(e.code))return new i[e.code](e)}}});i.supports=function(e){return"string"==typeof e?i.hasOwnProperty(e):e&&e.code?i.hasOwnProperty(e.code):!1},i.HttpError=i,Object.keys(a).forEach(function(e){o(+e,a[e])}),o(413,"RequestEntityTooLarge",i.PayloadTooLarge),o(414,"RequestURITooLarge",i.URITooLong),o(416,"RequestedRangeNotSatisfiable",i.RangeNotSatisfiable)},{createerror:2}],2:[function(t,r,o){!function(t,n){"object"==typeof o?r.exports=n():"function"==typeof e&&e.amd?e(n):t.createError=n()}(this,function(){function e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];if(r&&"object"==typeof r)for(var o=Object.keys(r),n=0;n<o.length;n++){var a=o[n];e[a]=r[a]}}return e}function t(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}return function(r,o){function n(t,u){if(a){var d=a(t);if(d instanceof n)return d;"undefined"!=typeof d&&(t=d)}var s,f=!1;return t instanceof Error?(s=t,u||(s=t,t={message:s.message,stack:s.stack},e(t,s),s=void 0)):(f=!0,"string"==typeof t&&(t={message:t})),s||(s=new Error(t&&t.message||r.message),s.__proto__=n.prototype,f&&Error.captureStackTrace&&Error.captureStackTrace(s,n)),o&&o.call(s,s,!0),e(s,i),r.data&&(s.data=e({},r.data)),"object"==typeof t&&t&&("data"in t&&(t=e({},t),s.data=s.data||{},e(s.data,t.data),delete t.data),e(s,t)),s}r=r||{},r.name&&(r[r.name]=!0);var a=r&&r.preprocess,i=e({},r);return delete i.data,delete i.preprocess,t(n,o||Error),r.name&&(n.name=r.name),n}})},{}]},{},[1])(1)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.HttpError=e()}}(function(){var e;return function t(e,r,o){function n(i,u){if(!r[i]){if(!e[i]){var d="function"==typeof require&&require;if(!u&&d)return d(i,!0);if(a)return a(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var f=r[i]={exports:{}};e[i][0].call(f.exports,function(t){var r=e[i][1][t];return n(r?r:t)},f,f.exports,t,e,r,o)}return r[i].exports}for(var a="function"==typeof require&&require,i=0;i<o.length;i++)n(o[i]);return n}({1:[function(e,t,r){function o(e,t,r){if(e=+e,!(400>e)){var o=t.replace(/ ([a-z])/gi,function(e,t){return t.toUpperCase()}).replace(/[^a-z]/gi,""),a=n({statusCode:e,status:e,name:o,http:!0,message:"HTTP "+e+" "+t},r||i.HttpError);return i[o]=a,i[e]||(i[e]=a),a}}var n=e("createerror"),a={400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},i=t.exports=n({name:"HttpError",preprocess:function(e){if(!(e instanceof i)){if("number"==typeof e&&!i.hasOwnProperty(e))return{statusCode:e};if(("string"==typeof e||"number"==typeof e)&&i.hasOwnProperty(e))return new i[e](e);if(e&&e.code&&i.hasOwnProperty(e.code))return new i[e.code](e)}}});i.supports=function(e){return"string"==typeof e?i.hasOwnProperty(e):e&&e.code?i.hasOwnProperty(e.code):!1},i.HttpError=i,Object.keys(a).forEach(function(e){o(+e,a[e])}),o(413,"RequestEntityTooLarge",i.PayloadTooLarge),o(414,"RequestURITooLarge",i.URITooLong),o(416,"RequestedRangeNotSatisfiable",i.RangeNotSatisfiable)},{createerror:2}],2:[function(t,r,o){!function(t,n){"object"==typeof o?r.exports=n():"function"==typeof e&&e.amd?e(n):t.createError=n()}(this,function(){function e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];if(r&&"object"==typeof r)for(var o=Object.keys(r),n=0;n<o.length;n++){var a=o[n];e[a]=r[a]}}return e}function t(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}return function(r,o){function n(t,u){if(a){var d=a(t);if(d instanceof n)return d;"undefined"!=typeof d&&(t=d)}var s,f=!1;return t instanceof Error?(s=t,u||(s=t,t={message:s.message,stack:s.stack},e(t,s),s=void 0)):(f=!0,"string"==typeof t&&(t={message:t})),s||(s=new Error(t&&t.message||r.message),s.__proto__=n.prototype,f&&Error.captureStackTrace&&Error.captureStackTrace(s,n)),o&&o.call(s,s,!0),e(s,i),r.data&&(s.data=e({},r.data)),"object"==typeof t&&t&&("data"in t&&(t=e({},t),s.data=s.data||{},e(s.data,t.data),delete t.data),e(s,t)),s}r=r||{},r.name&&(r[r.name]=!0);var a=r&&r.preprocess,i=e({},r);return delete i.data,delete i.preprocess,t(n,o||Error),r.name&&(Object.defineProperty?Object.defineProperty(n,"name",{value:r.name}):n.name=r.name),n}})},{}]},{},[1])(1)});

@@ -1,1 +0,1 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.HttpError=e()}}(function(){var e;return function t(e,r,o){function n(i,u){if(!r[i]){if(!e[i]){var d="function"==typeof require&&require;if(!u&&d)return d(i,!0);if(a)return a(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var f=r[i]={exports:{}};e[i][0].call(f.exports,function(t){var r=e[i][1][t];return n(r?r:t)},f,f.exports,t,e,r,o)}return r[i].exports}for(var a="function"==typeof require&&require,i=0;i<o.length;i++)n(o[i]);return n}({1:[function(e,t,r){function o(e,t,r){if(e=+e,!(400>e)){var o=t.replace(/ ([a-z])/gi,function(e,t){return t.toUpperCase()}).replace(/[^a-z]/gi,""),a=n({statusCode:e,status:e,name:o,http:!0,message:"HTTP "+e+" "+t},r||i.HttpError);return i[o]=a,i[e]||(i[e]=a),a}}var n=e("createerror"),a={400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},i=t.exports=n({name:"HttpError",preprocess:function(e){if(!(e instanceof i)){if("number"==typeof e&&!i.hasOwnProperty(e))return{statusCode:e};if(("string"==typeof e||"number"==typeof e)&&i.hasOwnProperty(e))return new i[e](e);if(e&&e.code&&i.hasOwnProperty(e.code))return new i[e.code](e)}}});i.supports=function(e){return"string"==typeof e?i.hasOwnProperty(e):e&&e.code?i.hasOwnProperty(e.code):!1},i.HttpError=i,Object.keys(a).forEach(function(e){o(+e,a[e])}),o(413,"RequestEntityTooLarge",i.PayloadTooLarge),o(414,"RequestURITooLarge",i.URITooLong),o(416,"RequestedRangeNotSatisfiable",i.RangeNotSatisfiable)},{createerror:2}],2:[function(t,r,o){!function(t,n){"object"==typeof o?r.exports=n():"function"==typeof e&&e.amd?e(n):t.createError=n()}(this,function(){function e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];if(r&&"object"==typeof r)for(var o=Object.keys(r),n=0;n<o.length;n++){var a=o[n];e[a]=r[a]}}return e}function t(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}return function(r,o){function n(t,u){if(a){var d=a(t);if(d instanceof n)return d;"undefined"!=typeof d&&(t=d)}var s,f=!1;return t instanceof Error?(s=t,u||(s=t,t={message:s.message,stack:s.stack},e(t,s),s=void 0)):(f=!0,"string"==typeof t&&(t={message:t})),s||(s=new Error(t&&t.message||r.message),s.__proto__=n.prototype,f&&Error.captureStackTrace&&Error.captureStackTrace(s,n)),o&&o.call(s,s,!0),e(s,i),r.data&&(s.data=e({},r.data)),"object"==typeof t&&t&&("data"in t&&(t=e({},t),s.data=s.data||{},e(s.data,t.data),delete t.data),e(s,t)),s}r=r||{},r.name&&(r[r.name]=!0);var a=r&&r.preprocess,i=e({},r);return delete i.data,delete i.preprocess,t(n,o||Error),r.name&&(n.name=r.name),n}})},{}]},{},[1])(1)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.HttpError=e()}}(function(){var e;return function t(e,r,o){function n(i,u){if(!r[i]){if(!e[i]){var d="function"==typeof require&&require;if(!u&&d)return d(i,!0);if(a)return a(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var f=r[i]={exports:{}};e[i][0].call(f.exports,function(t){var r=e[i][1][t];return n(r?r:t)},f,f.exports,t,e,r,o)}return r[i].exports}for(var a="function"==typeof require&&require,i=0;i<o.length;i++)n(o[i]);return n}({1:[function(e,t,r){function o(e,t,r){if(e=+e,!(400>e)){var o=t.replace(/ ([a-z])/gi,function(e,t){return t.toUpperCase()}).replace(/[^a-z]/gi,""),a=n({statusCode:e,status:e,name:o,http:!0,message:"HTTP "+e+" "+t},r||i.HttpError);return i[o]=a,i[e]||(i[e]=a),a}}var n=e("createerror"),a={400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},i=t.exports=n({name:"HttpError",preprocess:function(e){if(!(e instanceof i)){if("number"==typeof e&&!i.hasOwnProperty(e))return{statusCode:e};if(("string"==typeof e||"number"==typeof e)&&i.hasOwnProperty(e))return new i[e](e);if(e&&e.code&&i.hasOwnProperty(e.code))return new i[e.code](e)}}});i.supports=function(e){return"string"==typeof e?i.hasOwnProperty(e):e&&e.code?i.hasOwnProperty(e.code):!1},i.HttpError=i,Object.keys(a).forEach(function(e){o(+e,a[e])}),o(413,"RequestEntityTooLarge",i.PayloadTooLarge),o(414,"RequestURITooLarge",i.URITooLong),o(416,"RequestedRangeNotSatisfiable",i.RangeNotSatisfiable)},{createerror:2}],2:[function(t,r,o){!function(t,n){"object"==typeof o?r.exports=n():"function"==typeof e&&e.amd?e(n):t.createError=n()}(this,function(){function e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];if(r&&"object"==typeof r)for(var o=Object.keys(r),n=0;n<o.length;n++){var a=o[n];e[a]=r[a]}}return e}function t(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}return function(r,o){function n(t,u){if(a){var d=a(t);if(d instanceof n)return d;"undefined"!=typeof d&&(t=d)}var s,f=!1;return t instanceof Error?(s=t,u||(s=t,t={message:s.message,stack:s.stack},e(t,s),s=void 0)):(f=!0,"string"==typeof t&&(t={message:t})),s||(s=new Error(t&&t.message||r.message),s.__proto__=n.prototype,f&&Error.captureStackTrace&&Error.captureStackTrace(s,n)),o&&o.call(s,s,!0),e(s,i),r.data&&(s.data=e({},r.data)),"object"==typeof t&&t&&("data"in t&&(t=e({},t),s.data=s.data||{},e(s.data,t.data),delete t.data),e(s,t)),s}r=r||{},r.name&&(r[r.name]=!0);var a=r&&r.preprocess,i=e({},r);return delete i.data,delete i.preprocess,t(n,o||Error),r.name&&(Object.defineProperty?Object.defineProperty(n,"name",{value:r.name}):n.name=r.name),n}})},{}]},{},[1])(1)});

@@ -15,3 +15,3 @@ {

],
"version": "2.2.0",
"version": "2.3.0",
"repository": {

@@ -26,3 +26,3 @@ "type": "git",

"dependencies": {
"createerror": "1.2.0"
"createerror": "1.3.0"
},

@@ -29,0 +29,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc