Converts a String or Number to a Boolean.
boolean() converts values to true or false.
The parameter, n, is the value to convert. If n is a string, then boolean('true') will return true and every other string value will return false. If n is a number, then boolean(0) will return false and every other numeric value will return true. If an array is passed, as in boolean([0, 1, 'true', 'blue']), then an array of Boolean values will be returned.
Examples
Syntax
  
      boolean(n)
      
         
      
    
  
      boolean(ns)
      
         
      
    
Parameters
n
String|Boolean|Number: 
value to convert.
ns
Array: 
values to convert.
Returns
Boolean: converted Boolean value.
This page is generated from the comments in src/utilities/conversion.js . Please feel free to edit it and submit a pull request!