https://github.com/jondotsoy/stron
Use the generics variables to transform a string to boolean.
https://github.com/jondotsoy/stron
Last synced: about 2 months ago
JSON representation
Use the generics variables to transform a string to boolean.
- Host: GitHub
- URL: https://github.com/jondotsoy/stron
- Owner: JonDotsoy
- Created: 2018-01-24T17:50:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-26T13:13:51.000Z (about 1 year ago)
- Last Synced: 2024-04-28T00:21:50.714Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# stron
Use the generics variables to transform a string to boolean.
```javascript
const stron = require("stron");
const stroff = require("stroff");stron("on"); // => true
stron("active"); // => true
stron("inactive"); // => falsestroff("off"); // => true
stroff("disable"); // => true
stroff("False"); // => true
stroff("enable"); // => false
```**Example**
```javascript
const stron = require("stron");if (stron(process.env.FEATURENAME_ENABLED)) {
installFeature();
}
```