https://github.com/jonschlinkert/is-true
Returns `true` if the value of an object's property is strictly true, or it's inverse is false.
https://github.com/jonschlinkert/is-true
arguments argv boolean cli options true truthy
Last synced: 14 days ago
JSON representation
Returns `true` if the value of an object's property is strictly true, or it's inverse is false.
- Host: GitHub
- URL: https://github.com/jonschlinkert/is-true
- Owner: jonschlinkert
- License: mit
- Created: 2015-05-21T22:05:49.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-02T03:47:56.000Z (over 9 years ago)
- Last Synced: 2025-04-30T01:49:22.006Z (22 days ago)
- Topics: arguments, argv, boolean, cli, options, true, truthy
- Language: JavaScript
- Size: 129 KB
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# is-true [](http://badge.fury.io/js/is-true)
> Returns `true` if the value of an object's property is strictly true, or it's inverse is false.
## Install
Install with [npm](https://www.npmjs.com/)
```sh
$ 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.
```js
var isTrue = require('is-true');isTrue({a: true}, 'a');
//=> trueisTrue({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**
```js
isTrue({noa: false, a: true}, 'a');
//=> trueisTrue({noa: false, a: false}, 'a');
//=> falseisTrue({noa: true, a: true}, 'a');
//=> false
```## Related projects
* [is-false](https://www.npmjs.com/package/is-false): Returns false if the value of a property is either strictly false, or it's inverse… [more](https://www.npmjs.com/package/is-false) | [homepage](https://github.com/jonschlinkert/is-false)
* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object)
* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive)
* [is-true](https://www.npmjs.com/package/is-true): Returns `true` if the value of an object's property is strictly true, or it's inverse… [more](https://www.npmjs.com/package/is-true) | [homepage](https://github.com/jonschlinkert/is-true)
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject)## Running tests
Install dev dependencies:
```sh
$ npm i -d && npm test
```## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-true/issues/new).
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)## License
Copyright © 2015 Jon Schlinkert
Released under the MIT license.***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 01, 2015._