Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Takes an IPv4 address and a number, and returns an array of surrounding addresses.
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.travis.yml
index.js
package.json
readme.md

readme.md

ipv4-range

ipv4-range takes an IPv4 address and a number, and returns an array of surrounding addresses.

Build status

Install

npm install ipv4-range

API

ipv4-range(

  ip (string):
    the starting ip address.

  total (int):
    the number of surrounding addressed
    you're interested in. Odd numbers will
    result in the results being weighted to
    the left, where possible. 

)

Example

var range = require('ipv4-range')

range('192.168.0.4', 3)
// => ['192.168.0.2', '192.168.0.3', '192.168.0.5'] 

License

MIT

Something went wrong with that request. Please try again.