Converts strings to bools. - Node.js String

Node.js examples for String:Convert

Description

Converts strings to bools.

Demo Code


String.prototype.toBool = function()
{
  return this.toLowerCase() === 'true';
};

Related Tutorials