Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "rangerjs", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A lightweight JS library for defining an array of ranges.", | ||
@@ -5,0 +5,0 @@ "main": "ranger.js", |
@@ -20,2 +20,7 @@ | ||
ranger.prototype = { | ||
nextRange: function(now) { | ||
for (var i=0; i < this.ranges.length; i++) | ||
if (now < this.ranges[i].end) | ||
return this.ranges[i]; | ||
}, | ||
removeRecuringRange: function(start, end, interval, count, finish) { | ||
@@ -22,0 +27,0 @@ var _start = Number(start), |
@@ -52,5 +52,11 @@ ranger.js | ||
newRanger.checkRange(2, 4); //false | ||
newRanger.checkRange(2, 3); //true | ||
newRanger.checkRange(2, 3); //false | ||
newRanger.checkRange(3, 4); //true | ||
####newRanger.nextRange(now); | ||
newRanger.nextRange(1); // { start: 1, end: 2 } | ||
newRanger.nextRange(2); // { start: 3, end: 4 } | ||
newRanger.nextRange(5); // undefined | ||
newRanger.nextRange(); // undefined | ||
####newRanger.addRecuringRange(from, to, interval, count, finish); | ||
@@ -57,0 +63,0 @@ *Either `count` (of reptitions) or `finish` (final upper limit) must be set.* |
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
10376
194
93