Normalize number parsing in js