ip-subnet-calculator
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -6,3 +6,3 @@ { | ||
"homepage": "https://github.com/salieri/IPSubnetCalculator", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"files": [ | ||
@@ -9,0 +9,0 @@ "lib", |
@@ -1,12 +0,8 @@ | ||
IP Subnet Calculator | ||
================= | ||
# IP Subnet Calculator | ||
This module calculates optimal subnet masks for non-standard IP ranges, e.g. `5.4.3.21 - 6.7.8.9` | ||
JavaScript class for calculating optimal subnet masks for non-standard IP ranges, e.g. `5.4.3.21 - 6.7.8.9` | ||
[View demo](http://salieri.github.io/IPSubnetCalculator/) | ||
What does it do? | ||
---------------- | ||
## What does it do? | ||
* Calculates subnet masks for standard and non-standard IP ranges. For example, `10.0.0.5 - 10.0.0.23` will result in `10.0.0.5/32, 10.0.0.6/31, 10.0.0.8/29, 10.0.0.16/29`. | ||
@@ -17,5 +13,3 @@ * Calculates CIDR prefixes from subnet masks, e.g. `10.0.0.5/255.255.128.0` will result in `10.0.0.0/17`. | ||
Support | ||
------- | ||
## Support | ||
* Node.js | ||
@@ -25,5 +19,3 @@ * Direct browser use | ||
Installation | ||
------------ | ||
## Installation | ||
```sh | ||
@@ -34,4 +26,3 @@ > npm install ip-subnet-calculator | ||
Node.js | ||
------- | ||
## Node.js | ||
```javascript | ||
@@ -47,5 +38,3 @@ import * as IPSubnetCalculator from 'ip-subnet-calculator'; | ||
Direct browser use | ||
------------------ | ||
## Direct browser use | ||
```html | ||
@@ -63,6 +52,5 @@ <script src='lib/ip-subnet-calculator.browser.js'></script> | ||
API | ||
--- | ||
### IpSubnetCalculator.calculate(ipStart, ipEnd) ### | ||
## API | ||
### IpSubnetCalculator.calculate(ipStart, ipEnd) | ||
Calculates an optimal set of IP masks for the given IP address range. | ||
@@ -111,5 +99,3 @@ | ||
### IpSubnetCalculator.calculateSubnetMask(ip, prefixSize) ### | ||
### IpSubnetCalculator.calculateSubnetMask(ip, prefixSize) | ||
Calculates a subnet mask from CIDR prefix. | ||
@@ -123,5 +109,3 @@ | ||
### IpSubnetCalculator.calculateCIDRPrefix(ip, subnetMask) ### | ||
### IpSubnetCalculator.calculateCIDRPrefix(ip, subnetMask) | ||
Calculates a CIDR prefix from subnet mask. | ||
@@ -136,6 +120,5 @@ | ||
## Test Functions ## | ||
## Test Functions | ||
### IpSubnetCalculator.isIp(ipStr) ### | ||
### IpSubnetCalculator.isIp(ipStr) | ||
Tests whether string is an IP address. | ||
@@ -147,4 +130,3 @@ | ||
### IpSubnetCalculator.isDecimalIp(ipNum) ### | ||
### IpSubnetCalculator.isDecimalIp(ipNum) | ||
Tests whether `ipNum` is a decimal IP address. | ||
@@ -157,6 +139,5 @@ | ||
## Conversion Functions ## | ||
## Conversion Functions | ||
### IpSubnetCalculator.toDecimal(ip) ### | ||
### IpSubnetCalculator.toDecimal(ip) | ||
Calculates a decimal integer from an string IP address. | ||
@@ -172,4 +153,3 @@ | ||
### IpSubnetCalculator.toString(num) ### | ||
### IpSubnetCalculator.toString(num) | ||
> *num* (`number|string`) Decimal representation of an IP address. | ||
@@ -183,7 +163,5 @@ | ||
License | ||
------- | ||
## License | ||
[MIT](http://opensource.org/licenses/MIT) | ||
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
35789
156