{"name":"is-domain-name","version":"1.0.0","description":"Validate Domain Names as outlined by RFC 2181","main":"index.js","dependencies":{"tape":"^4.6.0"},"devDependencies":{},"scripts":{"test":"node test.js"},"repository":{"type":"git","url":"git+https://github.com/emilbayes/is-domain-name.git"},"keywords":["is","domain","name","rfc2181","dns","hostname","host"],"author":{"name":"Emil Bay","email":"github@tixz.dk"},"license":"ISC","bugs":{"url":"https://github.com/emilbayes/is-domain-name/issues"},"homepage":"https://github.com/emilbayes/is-domain-name#readme","gitHead":"76245d97e9e49425e804002df1239e7f7cd53bfc","_id":"is-domain-name@1.0.0","_shasum":"fe693fc75e1c5d761ea64ce179932fb8f4b269db","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.3.0","_npmUser":{"name":"emilbay","email":"github@tixz.dk"},"dist":{"shasum":"fe693fc75e1c5d761ea64ce179932fb8f4b269db","tarball":"http://registry-npm.ywwl.com/is-domain-name/download/is-domain-name-1.0.0.tgz","integrity":"sha512-tKdiS9OlTGXXnBrFDRxU7T6P66d6+rVTOdPYmgbA0EX6wxHClmPRdyEOmEwmvUncJTd66KhWggFfpfVHOkoOvw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrgHQ2/bvxGBY/nuaflt6c6EOAykK8Nax6zpY7ase+HgIhAOrLUtvKPRHQ5lYk90EMJ3RhXTqTrGVB36N4PPxs8QXb"}],"size":3193,"noattachment":false,"key":"/is-domain-name/-/is-domain-name-1.0.0.tgz"},"maintainers":[{"name":"emilbay","email":"github@tixz.dk"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/is-domain-name-1.0.0.tgz_1469422166606_0.4558402858674526"},"directories":{},"readme":"# `is-domain-name`\n\n> Validate Domain Names as outlined by RFC 2181\n\n\n## Install\n\n```sh\nnpm install is-domain-name\n```\n\n## Usage\n\nDomain names are composed of labels interleaved with a separator (`.`).\nDomain as allowed a total length of 255 chars including separators.\nLabels should be between 1 and 63 octets.\n\nLabels allows domains to form a hierarchy, with the right most label acting\nas the root. The leftmost label is often called the TLD (Top-Level Domain),\nthe 2nd leftmost informally called the domain and any label to the right of\nthose called subdomains.\n\nA common domain with only a single label is `localhost`.\n\nThis module checks the following:\n\n* The domain is no longer than 255 chars\n* The domain is at least 2 chars. Even though `a` is technically allowed, this module does not allow it\n* Labels are between 1 and 63 chars\n* Labels start and end with alpha-numeric chars, allowing dashes in between\n* An optional root dot can be allowed with a flag, eg. `example.com.`\n\n```js\nconst assert = require('assert')\nconst isDomainName = require('is-domain-name')\n\nassert.ok(isDomainName('localhost'))\nassert.notOk(isDomainName('-.-'))\n```\n\n## API\n\n### isDomainName(domainName, rootDot)\n#### domainName\n\nType: `String`\n\n#### rootDot\nType: `Boolean`<br>\nDefault: `false`\n\nWhether or not to validate for a trailing dot, signifying the root\n\n## Related\n\n* [`is-http-url`](http://github.com/emilbayes/is-http-url)\n\n## License\n\n[ISC](LICENSE.md)\n","publish_time":1469422168540,"_cnpm_publish_time":1469422168540,"dist-tags":{"latest":"1.0.1"}}