cut-the-mustard
v1.0.0
Published
Checking your JS environment is up to scratch
Downloads
4
Maintainers
Readme
cut-the-mustard
Checking your JS environment is up to scratch
Conditions
Cut the mustard tests makes available three levels of competence that a browser can have. Check cut the mustard revisited for details. The three levels are Basic, Advanced and Offline.
Installation
Install the module to your project. Recommended that you use the save flag to record its use in your package.json file.
$ npm install --save cut-the-mustard
Usage
Require the appropriate test.
var basicTest = require('cut-the-mustard/basic');
// OR
var basicTest = require('cut-the-mustard').basic;
Use it to test your context, which by default is the window object.
if (basicTest()) {
// All good
}
// OR
if (basicTest(window)) {
// All good
}
Documentation
Check the source for conditions of each level or refer to the article