{"name":"is-cidr","version":"3.1.0","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":"^6.2.1","eslint-config-silverwind":"^4.0.4","updates":"^8.5.3","ver":"^5.1.3"},"gitHead":"f1cb6ec3510b50e38c243fb8360b1c5bda4c0211","bugs":{"url":"https://github.com/silverwind/is-cidr/issues"},"homepage":"https://github.com/silverwind/is-cidr#readme","_id":"is-cidr@3.1.0","_nodeVersion":"12.8.1","_npmVersion":"6.10.3","dist":{"integrity":"sha512-3kxTForpuj8O4iHn0ocsn1jxRm5VYm60GDghK6HXmpn4IyZOoRy9/GmdjFA2yEMqw91TB1/K3bFTuI7FlFNR1g==","shasum":"72e233d8e1c4cd1d3f11713fcce3eba7b0e3476f","tarball":"http://registry-npm.ywwl.com/is-cidr/download/is-cidr-3.1.0.tgz","fileCount":5,"unpackedSize":4486,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdX2z5CRA9TVsSAnZWagAAf34P/3ujgdcZmfgLnobQ59AJ\nzrQfA4Kt2+3WxQuTQhJyXKxfQTj7c2jCRQIOPPxGcYNIoxf2iioMG1m96LIn\n/qtozGPCP2wMA/O/gkW1YP6tbXt6adqVi3artZ/UY0v88VTAACZ3i0e7S56y\nNrn7HXsPAI+ZlgMxVwLPM09lZjLpHbU4IuvSnA1NA8O6k2/MogZjmZalFGEP\nPajBKInJpoGgaIC1qKc+YvRfJSWnjmYSTYnIIYjRQ/qwyU71nWRXAkWwYdJj\naAgi7/OSOdDZmPNZGtyYQv69Q2a9Wb+IZSXDL8l3AhjWgN5b1obnvCzvnTb/\nUe5ZOiSC0emsljJqvqeYJ7pjASDpn7+PJzgN8GURrCLmFFv/tWrfbSkrJVf7\nBeBqcuNojBnNLZx63L4FUi3h+orB2INoLsU4I5G5TqgGaiT2KqRX8BYOiG5w\nO4chETwYCCTz0Qg0NN+lKKzQfGDc4TxDhOFPlBx1FeSSScGZw1FSFei7+MXB\n9UMYluScImpVGp4UEN+tZgC0SzxJj55R1oy/HT0bnwA1qaKnr9yIE6KLkXy+\n7VozKJlFl48uLZ3sfHw99FKEhspLVGVhZm2c8nIAhvl52DW3PcjYFk61ZAx0\n3IaTvXd7StYSymHbrpdNfUhxjJbhVysewXQhpsyVE99CnHf9q8uie4x8hBxK\nv9N+\r\n=RSjD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFr1leC0AaI6b/m7ijYFlpYQqGZc9yUWNw0JiKWxRgZeAiEA3YC8sjFSDv0FGZ1YbwAG/XK0mmCWP6+dZv+BYvpcW5Y="}],"size":2046,"noattachment":false,"key":"/is-cidr/-/is-cidr-3.1.0.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.0_1566534904379_0.20677978901472005"},"_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":1566534904501,"_cnpm_publish_time":1566534904501,"dist-tags":{"latest":"7.0.3"}}