{"name":"is-cidr","version":"4.0.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":">=10"},"keywords":["cidr","regex","notation","cidr notation","prefix","prefixes","ip","ip address","network"],"dependencies":{"cidr-regex":"^3.1.0"},"devDependencies":{"eslint":"7.8.1","eslint-config-silverwind":"18.0.8","jest":"26.4.2","updates":"10.3.6","versions":"8.4.3"},"jest":{"verbose":false,"testTimeout":10000},"gitHead":"2eb629f211aec822fe0e77724d4c6d5f3387599a","bugs":{"url":"https://github.com/silverwind/is-cidr/issues"},"homepage":"https://github.com/silverwind/is-cidr#readme","_id":"is-cidr@4.0.1","_nodeVersion":"14.8.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-8Y/Vn1DKqTnQtloseNMBXcVNW65wc5e4fKVKfYaYhkPhrs6ozqOiiwfYThEeJvJHfsXmNK+YLKb5SgnR4hvPDA==","shasum":"a078f3deca5d8edb3c05fc7fac1d8e17070e79eb","tarball":"http://registry-npm.ywwl.com/is-cidr/download/is-cidr-4.0.1.tgz","fileCount":5,"unpackedSize":4463,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfV7NsCRA9TVsSAnZWagAAPjUP/j1dq1193aQItgHqzbVN\nPyI3QB9zarSFAuZAGA5v2d36/kQJ6lx3BIDjU0kEhaYvzZi2D1jNiZIEXCIQ\nImnb7bz+SumreKisCmmb3Ina+JopBc0D7JtZSZdmQ3vd4LEDf91gHu+vq/Ec\n9mFOAeko0eTh1qSNeR6ZK77nezUpTczGXspXTjvYnBOx7nJw0ieUCXLeHZI6\nOtcqC1ZbyXSgZUXpdwoBK0/CBk29XeGdkGhXbe4Y8tU691vqYzBWvSNUYfKR\nA5i+jcgbAvYXucnWQPxo/PC4gkayUxHikI5NuXe4aMxKRq6tTLmneg8Xg+Af\nnv8tVlHcuF4KBOVhUM6txwdoW0GHRbUS/GEsQevifyG2NgA+5hVxZcmTOw/c\nNWgJYmb3fcXPUnmLiyXyEkBamnazRBM/vreeAbGQhuFjTijY7gw7hE6O6ZBS\n7MfIiwpJfHkdQI6XcgXVnMRKzSGDc34ToeqdJyJnm46Zd06AusEwSQfvhdqG\n/gnIzwylBd+G3oLwDwlobEf7x/J5y2nxtDl1DGAZA8LoH/6Dy12OzKriKMFo\n/eeB1f5cs4XzFHGhuHEuFIZiDyEpuU/LGDLEIccebIIjkRH21OILqxGMOb+n\nkdb/U73Epq26D8SfkWKJzxqTi/Baze9py0vKHyXopQE4AfcpyCTDaHEmwmdK\nWSOx\r\n=MiNC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBx8OH1XZ1I9mSaqFGpla0oi3js5n/Goze7fZiWgvm7CAiEA/Hb3NLYf9OfUkQahio2i76ic0WwEtKoUuQ8hYdpnEzs="}],"size":2092,"noattachment":false,"key":"/is-cidr/-/is-cidr-4.0.1.tgz"},"maintainers":[{"name":"flipjsio","email":"flipjs.io@gmail.com"},{"name":"silverwind","email":"npm@silverwind.io"}],"_npmUser":{"name":"silverwind","email":"npm@silverwind.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-cidr_4.0.1_1599583083723_0.4497776973533629"},"_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":1599583083839,"_cnpm_publish_time":1599583083839,"dist-tags":{"latest":"7.0.3"}}