Skip to content

Commit

Permalink
Fix splitting of the 1ms interval
Browse files Browse the repository at this point in the history
  • Loading branch information
Rashid Khan committed May 9, 2016
1 parent 1d7893e commit a2e693e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/split_interval.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module.exports = function splitInterval(interval) {
if (!interval.match(/[0-9]+[mshdwMy]/g)) {
if (!interval.match(/[0-9]+[mshdwMy]+/g)) {
throw new Error ('Malformed `interval`: ' + interval);
}
var parts = interval.match(/[0-9]+|[mshdwMy]/g);
var parts = interval.match(/[0-9]+|[mshdwMy]+/g);

return {
count: parts[0],
unit: parts[1]
};
};
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "timelion",
"version": "5.0.0-0.1.305",
"version": "5.0.0-0.1.306",
"dependencies": {
"body-parser": "^1.12.0",
"boom": "^2.8.0",
Expand Down

0 comments on commit a2e693e

Please sign in to comment.