from-family

v1.1.1
Checks the family of a HTTP status code.
check client code error family http informational redirection server and 3 more...

from-family

Checks the family of a HTTP status code.

Usage

$ npm install from-family
(...)
$ node
> var fromFamily = require('from-family')
undefined
> fromFamily.success(201)     // 201 (Created) is from "Success" family
true
> fromFamily.clientError(res) // It also reads response's 'statusCode'
false
npm i from-family

Metadata

  • Fair
  • Whatever
  • Talles L
  • released 7/10/2016

Downloads

Maintainers