function parseBool(string) {
  if (typeof string === 'string') {
    return /^(true|1)$/i.test(string);
  }

  return string;
}
/**
 * Parse a boolean from a string
 *
 * @param  {string} string A string to parse into a boolean
 * @return {mixed}         Either a boolean or the original value
 */
Parse a boolean from a string
@param  {string} string A string to parse into a boolean
@return {mixed}         Either a boolean or the original value
Parse a boolean from a string @param { string } string A string to parse into a boolean @return { mixed } Either a boolean or the original value
function parseBool(string) {
  if (typeof string === 'string') {
    return /^(true|1)$/i.test(string);
  }
  return string;
}
function parseBool ( string ) { if ( typeof string === 'string' ) { return / ^(true|1)$ / i . test ( string ) ; } return string ; }
Parse a boolean from a string
 @param  {string} string A string to parse into a boolean
 @return {mixed}         Either a boolean or the original value
Parse a boolean from a string @param { string } string A string to parse into a boolean @return { mixed } Either a boolean or the original value