From a3f5260e551486afce8114897fd56a6800b90b08 Mon Sep 17 00:00:00 2001 From: Devin Spikowski Date: Mon, 14 May 2018 04:30:57 -0400 Subject: [PATCH] Remove unnecessary escape characters --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 4dae082..b21f71e 100644 --- a/index.js +++ b/index.js @@ -54,11 +54,11 @@ function parseTimestring (string, returnUnit, opts) { let groups = string .toLowerCase() .replace(/[^.\w+-]+/g, '') - .match(/[-+]?[0-9\.]+[a-z]+/g) + .match(/[-+]?[0-9.]+[a-z]+/g) if (groups !== null) { groups.forEach(group => { - let value = group.match(/[0-9\.]+/g)[0] + let value = group.match(/[0-9.]+/g)[0] let unit = group.match(/[a-z]+/g)[0] totalSeconds += getSeconds(value, unit, unitValues)