{"name":"is-cidr","version":"2.0.4","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":">=4"},"files":["index.js"],"keywords":["cidr","regex","notation","cidr notation","prefix","prefixes","ip","ip address"],"devDependencies":{"ava":"^0.24.0","eslint":"^4.13.1","updates":"^2.0.3"},"dependencies":{"cidr-regex":"^2.0.5"},"gitHead":"2741a9bfe0e9c950d57ef49616b8b737b0ca2736","bugs":{"url":"https://github.com/silverwind/is-cidr/issues"},"homepage":"https://github.com/silverwind/is-cidr#readme","_id":"is-cidr@2.0.4","_npmVersion":"5.6.0","_nodeVersion":"8.9.1","_npmUser":{"name":"silverwind","email":"npm@silverwind.io"},"dist":{"integrity":"sha512-KNOXULRby+uYVB59FxTj8KCxANc/LbSD9LhieyXcVEcIuYoHcZVeElc++xcnwU/Mwoy193gKbPtP6hL3Poh+nQ==","shasum":"81b5b214a9f698c28eea0dfce200f7cb5b237a0f","tarball":"http://registry-npm.ywwl.com/is-cidr/download/is-cidr-2.0.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0QaQCBust4h3oTXoqX1wV9wCFs80zryQowTbktrDrwQIgF6mwJFIPTigGpQhtn22YmxBEO+WUWszg8inxolhEKhs="}],"size":1781,"noattachment":false,"key":"/is-cidr/-/is-cidr-2.0.4.tgz"},"maintainers":[{"email":"npm@silverwind.io","name":"silverwind"},{"email":"flipjs.io@gmail.com","name":"flipjsio"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-cidr-2.0.4.tgz_1513622743619_0.9502790092956275"},"directories":{},"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":1513622744564,"_cnpm_publish_time":1513622744564,"dist-tags":{"latest":"7.0.3"}}