0.1.0 • Published 10 years ago
base-is-enabled v0.1.0
base-is-enabled

base application plugin to add an
isEnabledmethod to the app
Install
Install with npm:
$ npm i base-is-enabled --saveUsage
Add base-is-enabled to an app.
var isEnabled = require('base-is-enabled');
var app.use(isEnabled());Check if the verbose property is enabled.
Returns true when verbose is true.
app.options.verbose = true;
console.log(app.isEnabled('verbose'));
//=> trueReturns false when verbose is false.
app.options.verbose = false;
console.log(app.isEnabled('verbose'));
//=> falseUse "falsey" patterns in the key path to toggle the results.
Returns false when verbose is true.
app.options.verbose = true;
console.log(app.isEnabled('not.verbose'));
//=> falseReturns true when verbose is false.
app.options.verbose = false;
console.log(app.isEnabled('not.verbose'));
//=> trueRelated projects
- falsey: Returns true if
valueis falsey. Works for strings, arrays andargumentsobjects with a… more | homepage - is-enabled: Using key paths that may contain "falsey" patterns, check if a property on an object… more | homepage
Generate docs
Generate readme and API documentation with verb:
$ npm i -d && npm run docsOr, if verb is installed globally:
$ verbRunning tests
Install dev dependencies:
$ npm i -d && npm testContributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Author
Brian Woodward
License
Copyright © 2016 Brian Woodward Released under the MIT license.
This file was generated by verb, v0.1.0, on February 25, 2016.
0.1.0
10 years ago