Node.js examples for String:Parse
Converts the string to a float value
/**/*from w w w. j av a2s . c o m*/ * converts the string to a float value * @param boolean flat if the method should not use a flexible matching * @return Float or NaN */ toFloat: function(strict) { return parseFloat(strict === true ? this : this.replace(',', '.').replace(/(\d)-(\d)/, '$1.$2')); }