javascript-status
v1.3.1
Published
Javascript Status is tiny HTTP status code utility library for readability.
Downloads
55
Maintainers
Readme
Javascript Status
Javascript Status is tiny HTTP status code utility library for readability.
Install
$ npm i --save javascript-status
Usage
ES5
var status = require('javascript-status').default; // Don't forget the .default here.
var express = require('express')
app.get('/', function (req, res) {
res.send('Hello World!', status.http200Ok);
});
app.listen(3000, function () {
console.log('Example app listening on port 3000!');
});
ES6 import statement and usage
import status from 'javascript-status'
console.log(status.http201Created)