Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

satisfies

gjohnson8MIT0.1.0

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

http, status-code

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