diff --git a/index.js b/index.js index b21f71e..194bff7 100644 --- a/index.js +++ b/index.js @@ -63,6 +63,8 @@ function parseTimestring (string, returnUnit, opts) { totalSeconds += getSeconds(value, unit, unitValues) }) + } else { + throw new Error(`The string [${string}] is invalid for timestring`) } if (returnUnit) {