mini-tools
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -29,3 +29,3 @@ "use strict"; | ||
if(!res.headersSent){ | ||
res.writeHead(400, { | ||
res.writeHead(err.status || 400, { | ||
'Content-Length': text.length, | ||
@@ -32,0 +32,0 @@ 'Content-Type': 'text/plain; charset=utf-8' |
{ | ||
"name": "mini-tools", | ||
"description": "mini tools for express and others", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"author": "Codenautas <codenautas@googlegroups.com>", | ||
@@ -18,3 +18,3 @@ "license": "MIT", | ||
"best-globals": "~0.4.6", | ||
"best-globals": "~0.4.8", | ||
"best-promise": "~0.2.4" | ||
@@ -21,0 +21,0 @@ }, |
@@ -38,4 +38,8 @@ # mini-tools | ||
Returns a function that sends a error message to de front-end. | ||
If the error object has setted the property | ||
* code: is displayed before the message | ||
* status: is sended in the header (otherwise "400" is sended) | ||
```js | ||
@@ -42,0 +46,0 @@ app.post('/insert' , function(req,res){ |
14273
183
Updatedbest-globals@~0.4.8