node package manager

satisfies

Checks whether a given value is with-in an http range.

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