Skip to content

Commit

Permalink
Add ranges as datatype
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenburger committed Sep 22, 2018
1 parent 864a33e commit 057f908
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ module.exports = class Config {
string: '"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"',
number: "(-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)",
boolean: "(true|false)",
null: "(null)"
null: "(null)",
range: "(\\d+\\.\\.\\d+|\\d+:\\d+\\.\\.\\d+|\\d+)"
}
}

Expand Down Expand Up @@ -72,6 +73,9 @@ module.exports = class Config {
)
)
break
case "range":
argumentsArray.push(currentArgument)
break
default:
argumentsArray.push(JSON.parse(currentArgument))
}
Expand Down

0 comments on commit 057f908

Please sign in to comment.