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".

$ npm install satisfies
var satisfies = require('satisfies');
var assert = require('assert');
 
// eq 
 
assert(satisfies(200, '200'));
 
// between 
 
assert(satisfies(200, '200~204'));
assert(satisfies(201, '200~204'));

MIT