satisfies
v0.1.0
Published
Checks whether a given value is with-in an http range.
Downloads
25
Readme
satisfies
Handy utility for checking if a status-code is within a "class".
Install
$ npm install satisfies
Usage
var satisfies = require('satisfies');
var assert = require('assert');
// eq
assert(satisfies(200, '200'));
// between
assert(satisfies(200, '200~204'));
assert(satisfies(201, '200~204'));
License
MIT