{"_id":"is-domain-name","_rev":"6-96c44861951d0e12ea472e00ae573b58","name":"is-domain-name","description":"Validate Domain Names as outlined by RFC 2181","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"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":"https://registry.npmjs.org/is-domain-name/-/is-domain-name-1.0.0.tgz","integrity":"sha512-tKdiS9OlTGXXnBrFDRxU7T6P66d6+rVTOdPYmgbA0EX6wxHClmPRdyEOmEwmvUncJTd66KhWggFfpfVHOkoOvw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrgHQ2/bvxGBY/nuaflt6c6EOAykK8Nax6zpY7ase+HgIhAOrLUtvKPRHQ5lYk90EMJ3RhXTqTrGVB36N4PPxs8QXb"}]},"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"}},"1.0.1":{"name":"is-domain-name","version":"1.0.1","description":"Validate Domain Names as outlined by RFC 2181","main":"index.js","dependencies":{},"devDependencies":{"tape":"^4.6.0"},"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":"dfc2cdb11e6cea752dec06745a0af7851a5bffae","_id":"is-domain-name@1.0.1","_shasum":"f6eb33b14a497541dca58335137d4466e0c20da1","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.3.0","_npmUser":{"name":"emilbay","email":"github@tixz.dk"},"dist":{"shasum":"f6eb33b14a497541dca58335137d4466e0c20da1","tarball":"https://registry.npmjs.org/is-domain-name/-/is-domain-name-1.0.1.tgz","integrity":"sha512-52ToNggHmkZGPl8yLFNrk+cKHUUnkhS0l2jh+yMLq6kj9C5IMLSztvJsW5WO5eMy0OS0jdu4o2tptT9dN0hAFg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLEuMwR9CM1DVGCS/C1Ie084k4stJ7DvsNoR921AX3PwIgGnJWkpcs7UEHzZTIDx1cOHK60ceRX+i5TTr3qTPMUog="}]},"maintainers":[{"name":"emilbay","email":"github@tixz.dk"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/is-domain-name-1.0.1.tgz_1469423328738_0.5552115952596068"}}},"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","maintainers":[{"email":"github@tixz.dk","name":"emilbayes"},{"email":"github@tixz.dk","name":"emilbay"}],"time":{"modified":"2022-06-19T02:39:55.033Z","created":"2016-07-25T04:49:28.540Z","1.0.0":"2016-07-25T04:49:28.540Z","1.0.1":"2016-07-25T05:08:50.842Z"},"homepage":"https://github.com/emilbayes/is-domain-name#readme","keywords":["is","domain","name","rfc2181","dns","hostname","host"],"repository":{"type":"git","url":"git+https://github.com/emilbayes/is-domain-name.git"},"author":{"name":"Emil Bay","email":"github@tixz.dk"},"bugs":{"url":"https://github.com/emilbayes/is-domain-name/issues"},"license":"ISC","readmeFilename":"README.md"}