{"name":"is-cidr","version":"1.0.0","description":"Check if a string is a valid CIDR","main":"lib/index.js","scripts":{"commit":"git-cz","prebuild":"npm run lint && npm run clean","build":"babel --presets es2015 -d lib/ src/","clean":"rimraf lib && mkdir lib","lint":"eslint src/ test/","test":"ava --require babel-register","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"repository":{"type":"git","url":"git+https://github.com/flipjs/is-cidr.git"},"keywords":["ip","ip address","cidr","netblock","regex"],"author":{"name":"Felipe Apostol","email":"flipjs.io@gmail.com","url":"http://flipjs.io/"},"license":"MIT","bugs":{"url":"https://github.com/flipjs/is-cidr/issues"},"homepage":"https://github.com/flipjs/is-cidr#readme","devDependencies":{"ava":"0.13.0","babel-cli":"6.6.5","babel-preset-es2015":"6.6.0","babel-register":"6.7.2","commitizen":"2.7.3","cz-conventional-changelog":"1.1.5","eslint":"2.4.0","eslint-config-standard":"5.1.0","eslint-plugin-babel":"3.1.0","eslint-plugin-promise":"1.1.0","eslint-plugin-standard":"1.3.2","ghooks":"1.0.3","rimraf":"2.5.2","semantic-release":"4.3.5"},"babel":{"presets":["es2015"]},"config":{"commitizen":{"path":"node_modules/cz-conventional-changelog"},"ghooks":{"pre-commit":"npm run test && npm run build"}},"dependencies":{"cidr-regex":"1.0.6"},"gitHead":"aff5d0db5e0cb2921f5119ddcbb645b380a379ca","_id":"is-cidr@1.0.0","_shasum":"fb5aacf659255310359da32cae03e40c6a1c2afc","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.6.0","_npmUser":{"name":"flipjsio","email":"flipjs.io@gmail.com"},"dist":{"shasum":"fb5aacf659255310359da32cae03e40c6a1c2afc","tarball":"http://registry-npm.ywwl.com/is-cidr/download/is-cidr-1.0.0.tgz","integrity":"sha512-IaCvhzobhmspClNQF750EuOF4PZu0BXfS8P/sQcOOoGaffcZhJZ0C523mlWrKmK0BFY30Nz2FF7Cik0i+C0CBA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG4qK0Vqln9TKnXxMKmjXWa+bd/T+UWkaOwoEjDPo+olAiEA9GCAVED4kKWuDmp+Gu/xj2cle0Ngx+kFspJz4glmv3c="}],"size":2817,"noattachment":false,"key":"/is-cidr/-/is-cidr-1.0.0.tgz"},"maintainers":[{"name":"flipjsio","email":"flipjs.io@gmail.com"}],"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/is-cidr-1.0.0.tgz_1458891203300_0.08885052264668047"},"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":1458891205473,"_cnpm_publish_time":1458891205473,"dist-tags":{"latest":"7.0.3"}}