is-boolean

v0.0.2arrow_drop_down
v0.0.2
v0.0.1
STATUS
Passing
DOWNLOADS
1
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
7 years ago
SIZE
N/A
Validate that a strings value is boolean
1 contributor
Install is-boolean as a package?
Copied
npm i @bit/amit.utils.string.is-boolean
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
string/isBoolean (
name:string
) : boolean

Validate that a strings value is boolean

Example
```js
const isBoolean = require('bit/string/is-boolean');
isBoolean(str)
```
Argument
name: string
Returns
boolean

Test Summary

isBoolean should return false if string value is diffrent from ['true’, 'false’, '1’, ‘0’]

Pass

isBoolean should return true if string value is boolean

Pass
Help and resources