Math.parse()

Convert the specified string to its numeric equivalent.

For example, "5" is converted to 5, "10.5" is converted to 10.5, and "-100.429" is converted to -100.429.

Usage

Hover over inputs/exits for more info.

var Math = require('machinepack-math');


// Convert the specified string to its numeric equivalent.

Math.parse({

string: '5',

}).execSync();

Inputs

string required

The string to parse.

'5'

Exits

error

An unexpected error occurred.

notANumber

The provided string cannot be converted into a number.

success

OK.

5