mirror of
https://github.com/thepeacockproject/Peacock
synced 2025-03-01 14:43:02 +01:00

Co-authored-by: Tino Roivanen <tino.roivanen98@gmail.com> Co-authored-by: Govert de Gans <grappigegovert@hotmail.com> Co-authored-by: Gray Olson <gray@grayolson.com> Co-authored-by: Alexandre Sanchez <alex73630@gmail.com> Co-authored-by: Anthony Fuller <24512050+anthonyfuller@users.noreply.github.com> Co-authored-by: atampy25 <24306974+atampy25@users.noreply.github.com> Co-authored-by: David <davidstulemeijer@gmail.com> Co-authored-by: c0derMo <c0dermo@users.noreply.github.com> Co-authored-by: Jeevat Singh <jeevatt.singh@gmail.com> Signed-off-by: Reece Dunham <me@rdil.rocks>
29 lines
840 B
Diff
29 lines
840 B
Diff
diff --git a/index.js b/index.js
|
|
index c425f1ee9d0944b1e2274ebb78528febf563d17e..2ee7a5c40090311ac8971a62f30d838d51ae5181 100644
|
|
--- a/index.js
|
|
+++ b/index.js
|
|
@@ -12,10 +12,9 @@
|
|
* @private
|
|
*/
|
|
|
|
-var deprecate = require('depd')('http-errors')
|
|
-var setPrototypeOf = require('setprototypeof')
|
|
+var setPrototypeOf = Object.setPrototypeOf
|
|
var statuses = require('statuses')
|
|
-var inherits = require('inherits')
|
|
+var inherits = require('util').inherits
|
|
var toIdentifier = require('toidentifier')
|
|
|
|
/**
|
|
@@ -69,10 +68,6 @@ function createError () {
|
|
}
|
|
}
|
|
|
|
- if (typeof status === 'number' && (status < 400 || status >= 600)) {
|
|
- deprecate('non-error status code; use only 4xx or 5xx status codes')
|
|
- }
|
|
-
|
|
if (typeof status !== 'number' ||
|
|
(!statuses.message[status] && (status < 400 || status >= 600))) {
|
|
status = 500
|