Converts argument to a value of type Boolean.
npm install to-boolean-x href="https://travis-ci.org/Xotic750/to-boolean-x"
title="Travis status"> src="https://travis-ci.org/Xotic750/to-boolean-x.svg?branch=master"
alt="Travis status" height="18">
href="https://david-dm.org/Xotic750/to-boolean-x"
title="Dependency status"> alt="Dependency status" height="18"/>
href="https://david-dm.org/Xotic750/to-boolean-x?type=dev"
title="devDependency status"> alt="devDependency status" height="18"/>
href="https://badge.fury.io/js/to-boolean-x"
title="npm version"> alt="npm version" height="18">
href="https://www.jsdelivr.com/package/npm/to-boolean-x"
title="jsDelivr hits"> alt="jsDelivr hits" height="18">
href="https://bettercodehub.com/results/Xotic750/to-boolean-x"
title="bettercodehub score"> alt="bettercodehub score" height="18">
href="https://coveralls.io/github/Xotic750/to-boolean-x?branch=master"
title="Coverage Status"> alt="Coverage Status" height="18">
Converts argument to a value of type Boolean.
The abstract operation ToBoolean converts argument to a value of type Boolean.
Kind: Exported function
Returns: boolean - 'true' if value is truthy; otherwise 'false'.
| Param | Type | Description |
| ----- | --------------- | -------------------------- |
| value | \* | The value to be converted. |
Example
``js
import toBoolean from 'to-boolean-x';
console.log(toBoolean(null)); // false
console.log(toBoolean('')); // false
console.log(toBoolean(1)); // true
console.log(toBoolean('0')); // true
``