@sineverba/getboolean
v1.0.0
Published
Returns a Boolean value, whatever the input value
Downloads
4
Readme
| CI / CD | Status | | ------- | ------ | | NPM | | | Semaphore CI | | | Circle CI | | | Coverall | | | SonarCloud | |
getboolean
returns a Boolean value, whatever the input value.
| Input | Output | | ----- | ------ | | true | true | | false | false | | "true" | true | | "false" | false | | "" | false | | undefined | false | | "TRUE" | true | | "FALSE" | false |
Installation
npm install @sineverba/getboolean
Usage
import { getBoolean } from "getBoolean";
const booleanValue = getBoolean(true); // returns true
const booleanValue = getBoolean("TRUE"); // returns true
Tests
npm run test
for simple test
npm run coverage
for coverage