New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

standard-http-error

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

standard-http-error - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

4

CHANGELOG.md

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

## 1.1.1 (Jun 4, 2015)
- Sets HttpError's name as a property on its prototype for when the code gets
minified and the constructor name is changed.
## 1.1.0 (May 21, 2015)

@@ -2,0 +6,0 @@ - Adds support for use in the browser by adding a cached copy of status codes.

7

index.js

@@ -18,2 +18,5 @@ exports = module.exports = HttpError

// Set name explicitly for when the code gets minified.
HttpError.prototype.name = "HttpError"
Object.defineProperties(HttpError.prototype, {

@@ -39,4 +42,4 @@ statusCode: alias("code"),

for (var code in STATUS_CODE_TO_NAME) {
var name = STATUS_CODE_TO_NAME[code]
exports[name.replace("'", "").replace(/[- ]/g, "_").toUpperCase()] = +code
var name = STATUS_CODE_TO_NAME[code]
exports[name.replace("'", "").replace(/[- ]/g, "_").toUpperCase()] = +code
}

@@ -43,0 +46,0 @@

{
"name": "standard-http-error",
"version": "1.1.0",
"version": "1.1.1",
"description": "Standard HTTP error class. Proper serialization, no bloat. Extensible.",

@@ -5,0 +5,0 @@ "keywords": [

StandardHttpError.js
====================
[![NPM version][npm-badge]](http://badge.fury.io/js/standard-http-error)
[npm-badge]: https://badge.fury.io/js/standard-http-error.png
[![NPM version][npm-badge]](https://www.npmjs.com/package/standard-http-error)

@@ -14,3 +13,5 @@ **StandardHttpError.js** is a very simple but useful **error class** for

[npm-badge]: https://img.shields.io/npm/v/standard-http-error.svg
Installing

@@ -17,0 +18,0 @@ ----------

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc