1.3.6 • Published 5 years ago

redis-ip-ranges v1.3.6

Weekly downloads
7
License
MIT
Repository
github
Last release
5 years ago

redis-ip-ranges

redis storage for not overlapping ip ranges with check ability

Installation

npm i redis-ip-ranges

Usage

const redis = require('redis');
const RedisIpRanges = require('./dist');
const client = redis.createClient();
const rangesHandler = new RedisIpRanges(client, 'proxies');

(async () => {
  await rangesHandler.insertBulk(['127.0.0.1', '10.0.0.0/8']);
  console.log(await rangesHandler.check('127.0.0.1')); //true
  console.log(await rangesHandler.check('10.10.128.1')); //true
  console.log(await rangesHandler.check('127.0.0.2')); //false
  console.log(await rangesHandler.check('8.8.8.8')); //false
})();
1.3.6

5 years ago

1.3.5

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago