parse-numeric-range
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -7,3 +7,3 @@ /** | ||
let res = [], m | ||
for (let str of string.split(',')) { | ||
for (let str of string.split(',').map(str => str.trim())) { | ||
// just a number | ||
@@ -10,0 +10,0 @@ if (/^-?\d+$/.test(str)) { |
{ | ||
"name": "parse-numeric-range", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Takes a string, such as \"1,2,3-10,5-8\" and turns it into an array of numbers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -55,3 +55,6 @@ import { expect } from 'chai' | ||
}); | ||
it('should parse ranges with a space in between', function() { | ||
peq('1-2, 3-4', [1,2,3,4]); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4913
81