0.1.1 • Published 10 years ago
is-true v0.1.1
is-true 
Returns
trueif the value of an object's property is strictly true, or it's inverse is false.
Install
Install with npm
$ npm i is-true --saveUsage
Returns true if a property is strictly true or its inverse is strictly false. The inverse of a is noa, the inverse of b is nob, and so on.
var isTrue = require('is-true');
isTrue({a: true}, 'a');
//=> true
isTrue({noa: false}, 'a');
//=> trueIf a property and it's inverse both exist, both must evaluate to the same result, or false is returned.
Examples
isTrue({noa: false, a: true}, 'a');
//=> true
isTrue({noa: false, a: false}, 'a');
//=> false
isTrue({noa: true, a: true}, 'a');
//=> falseRelated projects
- is-false: Returns false if the value of a property is either strictly false, or it's inverse… more | homepage
- is-plain-object: Returns true if an object was created by the
Objectconstructor. | homepage - is-primitive: Returns
trueif the value is a primitive. | homepage - is-true: Returns
trueif the value of an object's property is strictly true, or it's inverse… more | homepage - isobject: Returns true if the value is an object and not an array or null. | homepage
Running 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
Jon Schlinkert
License
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on November 01, 2015.