forked from enviPath/enviPy
Current Dev State
This commit is contained in:
50
static/js/ketcher2/node_modules/ternary/readme.md
generated
vendored
Normal file
50
static/js/ketcher2/node_modules/ternary/readme.md
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
# ternary [](https://travis-ci.org/bendrucker/ternary)
|
||||
|
||||
> Build a ternary statement
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save ternary
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var ternary = require('ternary')
|
||||
|
||||
ternary('condition', 'whenTruthy' : 'whenFalsy')
|
||||
//=> condition ? whenTruthy : whenFalsy
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
#### `ternary(condition, expr1, expr2)` -> `string`
|
||||
|
||||
##### condition
|
||||
|
||||
*Required*
|
||||
Type: `string`
|
||||
|
||||
The ternary condition.
|
||||
|
||||
##### expr1
|
||||
|
||||
*Required*
|
||||
Type: `string`
|
||||
|
||||
The expression to use when the condition is truthy.
|
||||
|
||||
##### expr2
|
||||
|
||||
*Required*
|
||||
Type: `string`
|
||||
|
||||
The expression to use when the condition is falsy.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Ben Drucker](http://bendrucker.me)
|
||||
Reference in New Issue
Block a user