{"name":"is-cidr","version":"3.0.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":"^5.7.0","eslint-config-silverwind":"^2.0.9","updates":"^4.5.2","ver":"^3.0.0"},"gitHead":"a042036655c77716ae1d520dcbfbc1eb0f9e786c","bugs":{"url":"https://github.com/silverwind/is-cidr/issues"},"homepage":"https://github.com/silverwind/is-cidr#readme","_id":"is-cidr@3.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"silverwind","email":"npm@silverwind.io"},"dist":{"integrity":"sha512-8Xnnbjsb0x462VoYiGlhEi+drY8SFwrHiSYuzc/CEwco55vkehTaxAyIjEdpi3EMvLPPJAJi9FlzP+h+03gp0Q==","shasum":"1acf35c9e881063cd5f696d48959b30fed3eed56","tarball":"http://registry-npm.ywwl.com/is-cidr/download/is-cidr-3.0.0.tgz","fileCount":4,"unpackedSize":3800,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbw4HuCRA9TVsSAnZWagAAAdUQAI5uW9m8WyJt2uEz7AN+\nAYdGfH6P3SKwLvf9yiMsumI3lI21omMinJpSwm0rZar5PqBSVrnYU/oZ4Yvv\nLbQnBLYmA1qIFXhICYiESb151epJ3yd3r2RJtxz/+uaoEgK5PNSeYBkcAZV/\nvX5oBA6gCixrmqV8lpiEA5TjrnOGxXU3SFbixz1kaG5aUd28JiIw8klsOCT+\nhKYBlvNsCNM25ciZihrO4vHqoZNjjvCZc1hrHDDGTyT9wIBr3n0Hmu972OaS\nfgmZeGCqL0aH6sy8iCrg5DxZTNB6f/alKD6jrkqRMNkCcQrAwFVyu4UHZOBG\naWlhA/1yXnUROy5LvnQgx6ziS2dOZWClrgBS1a5Ie32H53c1oEyuxg4n4G4l\nVVwwgtoX16Vb6djog14dbf5aR9Ss+Q6ofilfSdh6qVjCTAasNc18G0CjNJ8j\n5H+XwmE45bxGlW+99ENotpTNYHTsRQ3c6d/S9qJ6S5Yn6ZYfYQi/uJj3Ud9c\ni/y9zeyNkNr1PJmJimNshrIAmH0s/yh1p7JQo0yiUp0u2+Mcxk/4xiFmEU90\nhInG4u70Q0+reyu46Do7NSZK7I8ME6S4SPcvCyCfuG+Z5292Nkf2iG5shKsH\nyQTzuUkGivCD57PaeoW5RVS8hSuqCHU0ud1GhLmsGijJ4LSfdxEhXnUEVTfH\n5zpp\r\n=Ky5G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDZ18H3wN6XyIKqwUNEki5Ym8ENGhkK0+o5yYlQlBD2ZAiAuHgarCvlqXpqnW7X63Vt6dC1AN0dZgZfBXDJIVP147Q=="}],"size":1876,"noattachment":false,"key":"/is-cidr/-/is-cidr-3.0.0.tgz"},"maintainers":[{"email":"flipjs.io@gmail.com","name":"flipjsio"},{"email":"npm@silverwind.io","name":"silverwind"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-cidr_3.0.0_1539539437747_0.7997908119342516"},"_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":1539539437877,"_cnpm_publish_time":1539539437877,"dist-tags":{"latest":"7.0.3"}}