https://github.com/clpo13/rangecalc-js
Find the CIDR range of a set of IP addresses.
https://github.com/clpo13/rangecalc-js
cidr-range command-line ipv4 node-module
Last synced: 9 months ago
JSON representation
Find the CIDR range of a set of IP addresses.
- Host: GitHub
- URL: https://github.com/clpo13/rangecalc-js
- Owner: clpo13
- License: gpl-3.0
- Created: 2017-07-21T04:33:13.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-06-16T09:53:27.000Z (almost 2 years ago)
- Last Synced: 2025-08-10T20:05:19.437Z (10 months ago)
- Topics: cidr-range, command-line, ipv4, node-module
- Language: JavaScript
- Homepage: https://clpo13.github.io/rangecalc-js/
- Size: 2.08 MB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rangecalc
[](https://app.travis-ci.com/clpo13/rangecalc-js)
[](https://codecov.io/gh/clpo13/rangecalc-js)
[](https://www.npmjs.com/package/rangecalc)
Find the CIDR range of a set of IPv4 addresses. Requires [Node.js](https://nodejs.org).
## Get it
Install with `npm install rangecalc`. Use it in your code with `var rangecalc = require('rangecalc');`.
A simple CLI program is included to demonstrate range calculation. Run with
`rangecalc`. You can even try it without installation by running `npx rangecalc`.
## Use it
- `getCIDR`: Calculate the CIDR range of two IP addresses.
- `getInt`: Calculate an integer representation of an IP address.
- `sort`: Sort an array of IP addresses.
More information on the functions available can be found [here](https://clpo13.github.io/rangecalc-js).
## Improve it
Install the devDependencies with `npm install`. Run tests with `npm test`. Pull requests are more than welcome.
## To do
- [ ] Show how many addresses are in a range
- [ ] Calculate IPv6 addresses
## License
Copyright © 2017-2019 Cody Logan
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
A copy of the GNU General Public License can be found in [LICENSE](LICENSE) and at .