Skip to content

Commit

Permalink
Merge pull request #552 from arilotter/fix-float-parsing
Browse files Browse the repository at this point in the history
Allow numeric values with leading '+' and/or with exponent parts.
  • Loading branch information
juliangarnier authored Jul 24, 2019
2 parents b8dd074 + 091cb42 commit 4083aeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ function getPathProgress(path, progress) {
// Decompose value

function decomposeValue(val, unit) {
const rgx = /-?\d*\.?\d+/g;
const rgx = /[-+]?\d*\.?\d+([eE][-+]?\d+)?/g;
const value = validateValue((is.pth(val) ? val.totalLength : val), unit) + '';
return {
original: value,
Expand Down

0 comments on commit 4083aeb

Please sign in to comment.