{"name":"is-cidr","version":"3.1.1","description":"Check if a string is an IP address in CIDR notation","author":{"name":"silverwind","email":"me@silverwind.io"},"contributors":[{"name":"Felipe Apostol","email":"flipjs.io@gmail.com","url":"http://flipjs.io/"}],"repository":{"type":"git","url":"git+https://github.com/silverwind/is-cidr.git"},"license":"BSD-2-Clause","scripts":{"test":"make test"},"engines":{"node":">=6"},"keywords":["cidr","regex","notation","cidr notation","prefix","prefixes","ip","ip address","network"],"dependencies":{"cidr-regex":"^2.0.10"},"devDependencies":{"eslint":"7.0.0","eslint-config-silverwind":"13.1.0","jest":"26.0.1","updates":"10.2.11","versions":"8.2.9"},"jest":{"verbose":false,"testTimeout":10000},"gitHead":"3fabb424470e1f8844fa400ec7ef7df0d0c9cfec","bugs":{"url":"https://github.com/silverwind/is-cidr/issues"},"homepage":"https://github.com/silverwind/is-cidr#readme","_id":"is-cidr@3.1.1","_nodeVersion":"14.1.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-Gx+oErgq1j2jAKCR2Kbq0b3wbH0vQKqZ0wOlHxm0o56nq51Cs/DZA8oz9dMDhbHyHEGgJ86eTeVudtgMMOx3Mw==","shasum":"e92ef121bdec2782271a77ce487a8b8df3718ab7","tarball":"http://registry-npm.ywwl.com/is-cidr/download/is-cidr-3.1.1.tgz","fileCount":5,"unpackedSize":4464,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevDqZCRA9TVsSAnZWagAAdsMQAJ+FCPjnXhkCpbUwWhSF\n78emEGv+hVeSoknUFNGlE7dEPpClIVkBU055Fr0ugG9nZGcUfCG97pz/eOUJ\nhc+F6IjrGYLY9bwMVgSuyuXWCwWAFcCCkTg4g964nR0w72F24PiP/sGq0EpC\nlj1zcaStQ7c5EBu7NhQCoG9EF7VawLaqrguQ3gMYsXpNHF9xL+gjfH0BvaQ+\nxnoYAipg98trBXN0UYH1cvQUCIpk0w6R6cnOfe4z2TsiYRanTaE0LZNF72GO\nNDoowOy+B8Lh7Us+7803HqwejzEqhZopuhQsk+9jNflsx8DCvTsfSFHYMFOt\nqv/+QZpoY1hmggS4jMVmUB/kop7IV8wowAmH7DaYcMMQr+wPqa1D8w3uKsuv\nQ3i6zSc079KwYZOb0c17yz4xH6TNLtumxYt2J6kS2UaWEOOZX/lmnBoOrNGk\nCturZ8dm5vlIU8NZDG0+K7sV4oOYbm5d+opEC807+eJGIC3k+cHIt5yAQRdu\nf6Q2burjxTr60yyoNJ6PKUvWDF8l1yR9X+CoJh95xYFG75nRUIIiPEAQqvXT\ny4I44QxZLYTspTSy+3ORQbDggQGNDJw5S1tyw6MS7LsgAjJ4Oi4QpZzHf83A\njh0nE66LtvG/u+IbzyoG1RU4+Ob/qPWKMPXV/TwuxqeDZLjX8dc8r0Af9EMa\no11V\r\n=kk6+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6w0SxUCevvm3HwBbvZmnjif1cmHFbpJ9m2Ft6QC1e1QIgRZ18ZaWY/MjmaoLNWhSYFC1YXrFr9bp+VHOGX1kfVxU="}],"size":2088,"noattachment":false,"key":"/is-cidr/-/is-cidr-3.1.1.tgz"},"maintainers":[{"email":"flipjs.io@gmail.com","name":"flipjsio"},{"email":"npm@silverwind.io","name":"silverwind"}],"_npmUser":{"name":"silverwind","email":"npm@silverwind.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-cidr_3.1.1_1589394072882_0.7447502408889524"},"_hasShrinkwrap":false,"readme":"# is-cidr\n[![](https://img.shields.io/npm/v/is-cidr.svg?style=flat)](https://www.npmjs.org/package/is-cidr) [![](https://img.shields.io/npm/dm/is-cidr.svg)](https://www.npmjs.org/package/is-cidr) [![](https://packagephobia.com/badge?p=is-cidr)](https://packagephobia.com/result?p=is-cidr)\n\n> Check if a string is an IP address in CIDR notation\n\n## Install\n\n```\nnpm i is-cidr\n```\n\n## Usage\n\n```js\nimport isCidr from \"is-cidr\";\n\nisCidr(\"192.168.0.1/24\"); //=> 4\nisCidr(\"1:2:3:4:5:6:7:8/64\"); //=> 6\nisCidr(\"10.0.0.0\"); //=> 0\nisCidr.v6(\"10.0.0.0/24\"); //=> false\n```\n\n## API\n### isCidr(input)\n\nCheck if `input` is a IPv4 or IPv6 CIDR. Returns either `4`, `6` (indicating the IP version) or `0` if the string is not a CIDR.\n\n### isCidr.v4(input)\n\nCheck if `input` is a IPv4 CIDR. Returns a boolean.\n\n### isCidr.v6(input)\n\nCheck if `input` is a IPv6 CIDR. Returns a boolean.\n\n## Related\n\n- [ip-bigint](https://github.com/silverwind/ip-bigint) - Convert IPv4 and IPv6 addresses to native BigInt and vice-versa\n- [ip-regex](https://github.com/sindresorhus/ip-regex) - Regular expression for matching IP addresses\n- [is-ip](https://github.com/sindresorhus/is-ip) - Check if a string is an IP address\n- [cidr-regex](https://github.com/silverwind/cidr-regex) - Check if a string is an IP address in CIDR notation\n- [cidr-tools](https://github.com/silverwind/cidr-tools) - Tools to work with IPv4 and IPv6 CIDR network lists\n\n## License\n\n© [silverwind](https://github.com/silverwind), distributed under BSD licence\n\nBased on previous work by [Felipe Apostol](https://github.com/flipjs)\n","publish_time":1589394073402,"_cnpm_publish_time":1589394073402,"dist-tags":{"latest":"7.0.3"}}