Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rangerjs

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rangerjs - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"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.*

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc