standard-http-error
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -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. |
@@ -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 @@ ---------- |
19693
251
248