node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »

satisfies

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