{"_id":"neoip","_rev":"4-d3c334d5cb93a37392197b008a203a48","name":"neoip","dist-tags":{"latest":"3.1.0"},"versions":{"2.1.0":{"name":"neoip","version":"2.1.0","license":"MIT","_id":"neoip@2.1.0","maintainers":[{"name":"mikehall314","email":"mikehall314@gmail.com"}],"contributors":[{"name":"Fedor Indutny","email":"fedor@indutny.com"},{"name":"Mike Hall","email":"michael.hall@zaptic.com"}],"homepage":"https://github.com/zaptic/neoip","bugs":{"url":"https://github.com/zaptic/neoip/issues"},"dist":{"shasum":"66c8fb429ef007c341902261641e906b046cf594","tarball":"https://registry.npmjs.org/neoip/-/neoip-2.1.0.tgz","fileCount":3,"integrity":"sha512-4zQ8eVAmbBNV3Fmpm3Li2tNPnrU6UobMXpO1OZsY/Eg2AGOB+H8dZfAabMVrh7Xl9xAVIDcEIlUVA057Fi7QdA==","signatures":[{"sig":"MEUCICzdeoqezpnqH22M7G2scI9qlqMqdOQq1XJg0qe72G2yAiEA+FEUJtZZhNDhNzBPwFOmrzUcrA1eP6EbNa2xtNXCkC8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16007},"main":"lib/ip.js","gitHead":"ea3694f0e67ce218609ebb4b34b79e2dfe5d1c34","scripts":{"fix":"prettier --write lib/*.js test/*.js","lint":"eslint lib/*.js test/*.js","test":"npm run lint && mocha --reporter spec test/*-test.js"},"_npmUser":{"name":"mikehall314","email":"mikehall314@gmail.com"},"repository":{"url":"git+https://github.com/zaptic/neoip.git","type":"git"},"_npmVersion":"10.8.1","description":"IP address utilities for node.js, forked from `indutny/node-ip`. Should be usable as a drop-in replacement.","directories":{},"_nodeVersion":"20.14.0","_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.4.0","eslint":"^9.4.0","prettier":"^3.3.2","neostandard":"^0.7.0"},"_npmOperationalInternal":{"tmp":"tmp/neoip_2.1.0_1718197852515_0.19844758850171362","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"neoip","version":"3.0.0","keywords":["ip","address","range","cidr","subnet","mask","ipv4","ipv6"],"license":"MIT","_id":"neoip@3.0.0","maintainers":[{"name":"mikehall314","email":"mikehall314@gmail.com"}],"contributors":[{"name":"Fedor Indutny","email":"fedor@indutny.com"},{"name":"Mike Hall","email":"michael.hall@zaptic.com"}],"homepage":"https://github.com/zaptic/neoip","bugs":{"url":"https://github.com/zaptic/neoip/issues"},"dist":{"shasum":"05117b282601cc0c89b66e804b149556a00eae66","tarball":"https://registry.npmjs.org/neoip/-/neoip-3.0.0.tgz","fileCount":5,"integrity":"sha512-1iHzEVKfLRwsDuAqrxFZo5uBAhP6TasBxGabk5bEu58hdDcn8wMokep9Ub9Y/DP//gFMtJoNNon3aTeyyGI+JQ==","signatures":[{"sig":"MEYCIQDWfZVxC7v6StMHxogj1TSD3gmY7NJxm+W8HkgGDB3i6AIhAKUkw6CvxG3fszdOgaCK6IknI/W6/QziwNmSqvUpmkH0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41211},"main":"dist/ip.cjs","types":"dist/ip.d.ts","module":"dist/ip.mjs","exports":{".":{"import":"./dist/ip.mjs","require":"./dist/ip.cjs"}},"gitHead":"5ef59fd5ea6af2108509c89d0cd9c3552054025f","scripts":{"dev":"rollup -c -w","fix":"prettier --write src/*.ts","lint":"eslint src","test":"ts-mocha -p tsconfig.test.json 'src/**/*.test.ts'","build":"rollup -c","pretest":"npm run lint"},"_npmUser":{"name":"mikehall314","email":"mikehall314@gmail.com"},"repository":{"url":"git+https://github.com/zaptic/neoip.git","type":"git"},"_npmVersion":"10.8.1","description":"IP address utilities for node.js, forked from `indutny/node-ip`.","directories":{},"_nodeVersion":"20.14.0","_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.6.0","tslib":"^2.6.3","eslint":"^9.7.0","rimraf":"^6.0.1","rollup":"^4.18.1","prettier":"^3.3.3","ts-mocha":"^10.0.0","typescript":"^5.5.3","@types/node":"^20.14.10","neostandard":"^0.11.1","@types/mocha":"^10.0.7","@rollup/plugin-typescript":"^11.1.6"},"_npmOperationalInternal":{"tmp":"tmp/neoip_3.0.0_1724755070645_0.4269352486708009","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"neoip","version":"3.0.1","keywords":["ip","address","range","cidr","subnet","mask","ipv4","ipv6"],"license":"MIT","_id":"neoip@3.0.1","maintainers":[{"name":"mikehall314","email":"mikehall314@gmail.com"}],"contributors":[{"name":"Fedor Indutny","email":"fedor@indutny.com"},{"name":"Mike Hall","email":"michael.hall@zaptic.com"}],"homepage":"https://github.com/zaptic/neoip","bugs":{"url":"https://github.com/zaptic/neoip/issues"},"dist":{"shasum":"f201fd5d9b1d596765fadbcfd688fbdab295487a","tarball":"https://registry.npmjs.org/neoip/-/neoip-3.0.1.tgz","fileCount":5,"integrity":"sha512-yvMLOFvS7Tzthf9Ukl2/HrVzZqSjxm9PVOdAPLCt7pelDQ5WvJMIur1vNn3VXOL2tqrbzv6Vnal4PyoCrtRZPA==","signatures":[{"sig":"MEQCICg0HN9NNhysHdEdAOQwcWB8lJoEAO2NYbGYwkHo84azAiAzZmXqHhH1fS4Rsi72k4i1HtZfZNw+0swHUVshHa/fnQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41244},"main":"dist/ip.cjs","types":"dist/ip.d.ts","module":"dist/ip.mjs","exports":{".":{"types":"./dist/ip.d.ts","import":"./dist/ip.mjs","require":"./dist/ip.cjs"}},"gitHead":"c9e6d56217b545c9def84df26581f5e2163ce95f","scripts":{"dev":"rollup -c -w","fix":"prettier --write src/*.ts","lint":"eslint src","test":"ts-mocha -p tsconfig.test.json 'src/**/*.test.ts'","build":"rollup -c","pretest":"npm run lint"},"_npmUser":{"name":"mikehall314","email":"mikehall314@gmail.com"},"repository":{"url":"git+https://github.com/zaptic/neoip.git","type":"git"},"_npmVersion":"10.8.1","description":"IP address utilities for node.js, forked from `indutny/node-ip`.","directories":{},"_nodeVersion":"20.14.0","_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.6.0","tslib":"^2.6.3","eslint":"^9.7.0","rimraf":"^6.0.1","rollup":"^4.18.1","prettier":"^3.3.3","ts-mocha":"^10.0.0","typescript":"^5.5.3","@types/node":"^20.14.10","neostandard":"^0.11.1","@types/mocha":"^10.0.7","@rollup/plugin-typescript":"^11.1.6"},"_npmOperationalInternal":{"tmp":"tmp/neoip_3.0.1_1726402215075_0.9814858218763729","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"neoip","version":"3.1.0","contributors":[{"name":"Fedor Indutny","email":"fedor@indutny.com"},{"name":"Mike Hall","email":"michael.hall@zaptic.com"}],"homepage":"https://github.com/zaptic/neoip","repository":{"type":"git","url":"git+https://github.com/zaptic/neoip.git"},"keywords":["ip","address","range","cidr","subnet","mask","ipv4","ipv6"],"module":"dist/ip.mjs","types":"dist/ip.d.ts","main":"dist/ip.cjs","exports":{".":{"import":"./dist/ip.mjs","require":"./dist/ip.cjs","types":"./dist/ip.d.ts"}},"devDependencies":{"@rollup/plugin-typescript":"^12.3.0","@types/mocha":"^10.0.7","@types/node":"^20.14.10","eslint":"^9.39.2","mocha":"^11.3.0","neostandard":"^0.12.2","prettier":"^3.8.1","rimraf":"^6.1.2","rollup":"^4.56.0","ts-mocha":"^11.1.0","tslib":"^2.8.1","typescript":"^5.9.3"},"scripts":{"lint":"eslint src","pretest":"npm run lint","test":"ts-mocha -p tsconfig.test.json 'src/**/*.test.ts'","fix":"prettier --write src/*.ts","build":"rollup -c","dev":"rollup -c -w"},"license":"MIT","gitHead":"57262d0c3f83dbf527be558f262b8f5a304fe21a","_id":"neoip@3.1.0","description":"IP address utilities for node.js, forked from `indutny/node-ip`.","bugs":{"url":"https://github.com/zaptic/neoip/issues"},"_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-KtkXRRp1XK2BzJpLF7PRHyndphWn/bU5XkQFUJtAdm6rdUenkJZwQDpxifG+Q/7PLpxhc+wdcZiE15L/cZhnXA==","shasum":"f3ef46bd5d7f092307ff356fe04492f95e7b2fe5","tarball":"https://registry.npmjs.org/neoip/-/neoip-3.1.0.tgz","fileCount":5,"unpackedSize":41258,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHagHrbyXwmQ2UkLjN8wTMEM3PYtTzEo1jfNyGAVNfXWAiBCAk7X3S1xCkgNWMol9K+VFDLTJDCS6OaGtDiJ63HP7g=="}]},"_npmUser":{"name":"mikehall314","email":"mikehall314@gmail.com"},"directories":{},"maintainers":[{"name":"mikehall314","email":"mikehall314@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/neoip_3.1.0_1769182088229_0.3943400701596089"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-12T13:10:52.514Z","modified":"2026-01-23T15:28:08.491Z","2.1.0":"2024-06-12T13:10:52.672Z","3.0.0":"2024-08-27T10:37:50.795Z","3.0.1":"2024-09-15T12:10:15.254Z","3.1.0":"2026-01-23T15:28:08.400Z"},"bugs":{"url":"https://github.com/zaptic/neoip/issues"},"license":"MIT","homepage":"https://github.com/zaptic/neoip","keywords":["ip","address","range","cidr","subnet","mask","ipv4","ipv6"],"repository":{"type":"git","url":"git+https://github.com/zaptic/neoip.git"},"description":"IP address utilities for node.js, forked from `indutny/node-ip`.","contributors":[{"name":"Fedor Indutny","email":"fedor@indutny.com"},{"name":"Mike Hall","email":"michael.hall@zaptic.com"}],"maintainers":[{"name":"mikehall314","email":"mikehall314@gmail.com"}],"readme":"# NeoIP\n\nIP address utilities for node.js, forked from `indutny/node-ip`.\n\n## Version 2.x\n\nVersion 2.x aims to be API compatible with `indutny/node-ip`. If you need\nstrict compatibility with the original version use the latest 2.x version.\n\n## Version 3.x\n\nVersion 3.x has a very similar API, but has been refactored internally to remove\nedge cases introduced by atypical IP address formats. If you're starting a new\nproject, or are willing to do some minor remedial work, use the latest 3.x.\n\n3.x exports versions for ESM and for CommonJS.\n\n## Installation\n\n### npm\n\n```shell\nnpm install neoip\n```\n\n### git\n\n```shell\ngit clone https://github.com/zaptic/neoip.git\n```\n\n## Usage\n\nGet your ip address, compare ip addresses, validate ip addresses, etc.\n\n```js\nimport * as ip from 'neoip';\n// Or const ip = require(\"neoip\");\n\nip.address(); // my ip address\nip.isEqual('::1', '::0:1'); // true\nip.toBuffer('127.0.0.1'); // Buffer([127, 0, 0, 1])\nip.toString(new Buffer([127, 0, 0, 1])); // 127.0.0.1\nip.fromPrefixLen(24); // 255.255.255.0\nip.mask('192.168.1.134', '255.255.255.0'); // 192.168.1.0\nip.cidr('192.168.1.134/26'); // 192.168.1.128\nip.not('255.255.255.0'); // 0.0.0.255\nip.or('192.168.1.134', '0.0.0.255'); // 192.168.1.255\nip.isPrivate('127.0.0.1'); // true\nip.isV4Format('127.0.0.1'); // true\nip.isV6Format('::ffff:127.0.0.1'); // true\n\n// operate on buffers in-place\nconst buf = Buffer.alloc(128);\nconst offset = 64;\nip.toBuffer('127.0.0.1', buf, offset); // [127, 0, 0, 1] at offset 64\nip.toString(buf, offset, 4); // '127.0.0.1'\n\n// subnet information\nip.subnet('192.168.1.134', '255.255.255.192');\n// { networkAddress: '192.168.1.128',\n//   firstAddress: '192.168.1.129',\n//   lastAddress: '192.168.1.190',\n//   broadcastAddress: '192.168.1.191',\n//   subnetMask: '255.255.255.192',\n//   subnetMaskLength: 26,\n//   numHosts: 62,\n//   length: 64,\n//   contains: function(addr){...} }\n\n// This is equivalent to the above\nip.cidrSubnet('192.168.1.134/26');\n\n// range checking\nip.cidrSubnet('192.168.1.134/26').contains('192.168.1.190'); // true\n\n// ipv4 long conversion\nip.toLong('127.0.0.1'); // 2130706433\nip.fromLong(2130706433); // '127.0.0.1'\n```\n\n### License\n\nThis software is licensed under the MIT License.\n\nCopyright Fedor Indutny, 2012.\nCopyright Juliand Digital Ltd, and other contributors 2024.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to permit\npersons to whom the Software is furnished to do so, subject to the\nfollowing conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\nNO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\nUSE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md"}