javascript parse boolean from text