{"_id":"cidr-split","_rev":"2-f4d3245bd5fd878ffc1040fc7e3ec865","name":"cidr-split","description":"Split facility for CIDRs.","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.1":{"name":"cidr-split","version":"0.1.1","description":"Split facility for CIDRs.","scripts":{"assert-latest-node":"(node -v | grep -q ${npm_package_scriptvars_latest_node}) || (echo \"Expected node version ${npm_package_scriptvars_latest_node}, got $(node -v)\" && exit 1)","inject-examples":"node scripts/injectExamples.js","prepublishOnly":"npm run inject-examples","readme":"node examples/readme.js"},"scriptvars":{"latest_node":"v9.1.0"},"main":"index.js","dependencies":{"bignumber.js":"4.1.0","buffershift":"0.0.2"},"repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/cidr-math.git"},"keywords":["cidr","subnet","math"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"}],"license":"MIT","gitHead":"ff2d530c853388f0cd778a6631958bd407fac724","bugs":{"url":"https://github.com/tristanls/cidr-math/issues"},"homepage":"https://github.com/tristanls/cidr-math#readme","_id":"cidr-split@0.1.1","_npmVersion":"5.5.1","_nodeVersion":"9.1.0","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"integrity":"sha512-XbOPTcANR1fxbIFCSFTi4xHp1FwnhhOL9y5v/KSxq/7XhYDItXY9ppUv8LSptt/Acke4RnKpMLH6EIzJrHbxdA==","shasum":"35f25838cfd55b4a709051576126d3cd76494a81","tarball":"https://registry.npmjs.org/cidr-split/-/cidr-split-0.1.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6+E46FLaBqELHUjmlvHwaxi4msGZ3Bk2k/9bZCJet2QIgei2Fm0mgtyan9IXlwQia8MddSrhFOlO6bmbyzvTFKp4="}]},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cidr-split-0.1.1.tgz_1510191985194_0.6484528111759573"},"directories":{}},"0.1.2":{"name":"cidr-split","version":"0.1.2","description":"Split facility for CIDRs.","scripts":{"assert-latest-node":"(node -v | grep -q ${npm_package_scriptvars_latest_node}) || (echo \"Expected node version ${npm_package_scriptvars_latest_node}, got $(node -v)\" && exit 1)","inject-examples":"node scripts/injectExamples.js","prepublishOnly":"npm run inject-examples","readme":"node examples/readme.js"},"scriptvars":{"latest_node":"v10.3.0"},"main":"index.js","dependencies":{"bignumber.js":"7.2.1"},"repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/cidr-math.git"},"keywords":["cidr","subnet","math"],"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"}],"license":"MIT","gitHead":"fd13525cba297df81b35cda181885ef9e8d57b55","bugs":{"url":"https://github.com/tristanls/cidr-math/issues"},"homepage":"https://github.com/tristanls/cidr-math#readme","_id":"cidr-split@0.1.2","_npmVersion":"6.1.0","_nodeVersion":"10.3.0","_npmUser":{"name":"tristanls","email":"tristan.slominski@gmail.com"},"dist":{"integrity":"sha512-kGtEi2XkWDPZJrIASRgwIW7VauA7i5bc7GBt06I4XQJPIRjbD0QtKr2HzW1FsRxIGi+IaGta98r2BvwU1uWmNQ==","shasum":"58f65e6eefe2c56ce79553da1f6e0e478ccd4d0e","tarball":"https://registry.npmjs.org/cidr-split/-/cidr-split-0.1.2.tgz","fileCount":7,"unpackedSize":12542,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbEqFhCRA9TVsSAnZWagAAtxkP/R/5t4OHgpxZKHi0RrS9\nLbYRhQEC049/4YZ/c9/tOvcw7ZT79J0VqRxg8B+nb8AxLi7YOJ9Xfxfzbl5P\ncp3XLhcnCN2o5IC5U5AIjTqpawq68oge3IPyW8l7aj1+Ki221yMEgHssmai7\ni1XHzH6Y3i5RlAYRL7jzGl7ARCB+UO3uvfnLCh1FM+GLjEFiLlkbMPFbk1+1\nchQ3HrXrnlRAtkdio+U5dsapKdZFRFADRS+LKmOUlCe224bC1w986yiydJ3Z\nPx/zrLbWTqX2vdn+cGX+6k1tuuJ8i2VyMy4yrlhPpP4nVzEmQTrQpLv1BBbq\n2+VxhM49ZZrBUuIfiolwcqbzSGJ5ndAJD3BrLlsONw2HQiZgwNsfpoopn4MT\n9ZRJfB9E0vTQ95MVJGP57790jsq02WM0gyygga+VoMJ7WMVyye6y8r57eGX+\nVFKATjN8Y2weQ1/6tpcmHmywDOntPDDOb38Etzx5cVDWqEGp10/zBauXo7jR\n9pdXa7O/1G4kjFxmswhG1eP8b/iXXTmwrenVw5Ao8YTprGVmTS8V7t1jZB5W\nK3TrchWgOVgwc5TEYeT5/PW1P3NK1gwgyDvPtBpYARoQk1y55ipGu+wNfmyb\nzmqdym6gH91yJ51XC27+HUYZXgjSvSOWJVTZ3aXe1riAYuqCES2/ypUmFcKC\nbBT6\r\n=OdaR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCG8iLGMH3s4jaJZmfZhFXZO3wpj9206GvyDKTe9tHO9wIgdPGGpeMlTr2YfRs/H7Ft5SQB9OnhMDNfOOvRcugKmJ8="}]},"maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cidr-split_0.1.2_1527947616529_0.5306552955063519"},"_hasShrinkwrap":false}},"readme":"# cidr-split\n\n_Stability: 1 - [Experimental](https://github.com/tristanls/stability-index#stability-1---experimental)_\n\n[![NPM version](https://badge.fury.io/js/cidr-split.png)](http://npmjs.org/package/cidr-split)\n\nSplit facility for CIDRs.\n\n## Contributors\n\n[@tristanls](https://github.com/tristanls)\n\n## Contents\n\n  * [Installation](#installation)\n  * [Usage](#usage)\n  * [Tests](#tests)\n  * [Documentation](#documentation)\n    * [CIDR](#cidr)\n  * [Releases](#releases)\n\n## Installation\n\n    npm install cidr-split\n\n## Usage\n\nTo run the below example, run:\n\n    npm run readme\n\n```javascript\n\"use strict\";\n\nconst CIDR = require(\"../index.js\");\n\nconsole.log(\"Split 10.0.0.0/16 into two and print out\");\nCIDR.fromString(\"10.0.0.0/16\").split().map(cidr => console.log(cidr.toString()));\n\nconsole.log(\"Split 10.0.0.0/16 into four and print out\");\nCIDR.fromString(\"10.0.0.0/16\")\n    .split()\n    .map(cidr => cidr.split())\n    .reduce((all, halves) => all.concat(...halves))\n    .map(cidr => console.log(cidr.toString()));\n\n```\n\n## Tests\n\nNo tests at this time.\n\n## Documentation\n\n  * [CIDR](#cidr)\n\n### CIDR\n\n**Public API**\n\n  * [CIDR.fromString(cidr)](#cidrfromstringcidr)\n  * [cidr.split()](#cidrsplit)\n\n### CIDR.fromString(cidr)\n\n  * `cidr`: _String_ String representation of a CIDR, ex: `10.0.0.0/16`\n  * Return: _CIDR_ CIDR created from the string.\n\nParses `cidr` string and creates a `CIDR` object.\n\n### cidr.split()\n\n  * Retrun: _Array_ Array of two CIDRs, each being one half of the `cidr`.\n\nIf possible, splits the `cidr` into two CIDRs that are half the size.\n\n## Releases\n\nWe follow semantic versioning policy (see: [semver.org](http://semver.org/)):\n\n> Given a version number MAJOR.MINOR.PATCH, increment the:\n>\n>MAJOR version when you make incompatible API changes,<br/>\n>MINOR version when you add functionality in a backwards-compatible manner, and<br/>\n>PATCH version when you make backwards-compatible bug fixes.\n\n**caveat**: Major version zero is a special case indicating development version that may make incompatible API changes without incrementing MAJOR version.\n","maintainers":[{"name":"tristanls","email":"tristan.slominski@gmail.com"}],"time":{"modified":"2022-04-12T06:22:24.952Z","created":"2017-11-09T01:46:26.084Z","0.1.1":"2017-11-09T01:46:26.084Z","0.1.2":"2018-06-02T13:53:36.741Z"},"homepage":"https://github.com/tristanls/cidr-math#readme","keywords":["cidr","subnet","math"],"repository":{"type":"git","url":"git+ssh://git@github.com/tristanls/cidr-math.git"},"contributors":[{"name":"Tristan Slominski","email":"tristan.slominski@gmail.com"}],"bugs":{"url":"https://github.com/tristanls/cidr-math/issues"},"license":"MIT","readmeFilename":"README.md"}