is-true
Returns `true` if the value of an object's property is strictly true, or it's inverse is false.
Last updated 10 years ago by jonschlinkert .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install is-true 
SYNC missed versions from official npm registry.

is-true NPM version

Returns true if the value of an object's property is strictly true, or it's inverse is false.

Install

Install with npm

$ npm i is-true --save

Usage

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');
//=> true

If 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');
//=> false

Related projects

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

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.

Current Tags

  • 0.1.1                                ...           latest (10 years ago)

2 Versions

  • 0.1.1                                ...           10 years ago
  • 0.1.0                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (1)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |