{"_id":"github-username-regex","_rev":"3-d5b6badadc9b7c7745bdb171d2ed88a3","name":"github-username-regex","description":"A regular expression that only matches a valid Github username","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.0":{"name":"github-username-regex","version":"0.0.0","description":"A regular expression that only matches a valid Github username","repository":{"type":"git","url":"git+https://github.com/shinnn/github-username-regex.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"prebuild":"eslint --fix --format=codeframe module.js test.js","build":"rollup --config=node:module --no-strict","pretest":"npm run-script build","test":"node --throw-deprecation test.js"},"license":"CC0-1.0","module":"module.js","files":["index.js","module.js"],"keywords":["github","name","username","login","account","validate","validation","match","regex","regexp"],"devDependencies":{"@shinnn/eslint-config-node":"^3.0.0","eslint":"^3.13.1","rollup":"^0.41.4","rollup-config-module":"^1.0.0"},"eslintConfig":{"extends":"@shinnn/node"},"bugs":{"url":"https://github.com/shinnn/github-username-regex/issues"},"homepage":"https://github.com/shinnn/github-username-regex#readme","_id":"github-username-regex@0.0.0","_shasum":"b0dc151c46b41791556949ff858093f2f76f439a","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.4.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"b0dc151c46b41791556949ff858093f2f76f439a","tarball":"https://registry.npmjs.org/github-username-regex/-/github-username-regex-0.0.0.tgz","integrity":"sha512-fLu/IvA3Wm1e0xFhpaPszLt3iYeRW7BWOsDcHbwQxJ1VyaMtOO9zbIP4QHixY4ECPIzVQJ53aTYh1eeVGBxV8w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBgWi49UY1a9HGKeYPYgTQv/2d/v0ouO4AJH66WHTkOYAiAFF0pOLrNfszcsWBk8eBU4zgQaA9nv/+qv4hQP4ATHKg=="}]},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/github-username-regex-0.0.0.tgz_1484651236170_0.9995021256618202"}},"1.0.0":{"name":"github-username-regex","version":"1.0.0","description":"A regular expression that only matches a valid Github username","repository":{"type":"git","url":"git+https://github.com/shinnn/github-username-regex.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"prebuild":"eslint --fix --format=codeframe module.js test.js","build":"rollup --config=node:module --no-strict","pretest":"npm run-script build","test":"node --throw-deprecation test.js"},"license":"CC0-1.0","module":"module.js","files":["index.js","module.js"],"keywords":["github","name","username","login","account","validate","validation","match","regex","regexp"],"devDependencies":{"@shinnn/eslint-config-node":"^3.0.0","eslint":"^3.13.1","rollup":"^0.41.4","rollup-config-module":"^1.0.0"},"eslintConfig":{"extends":"@shinnn/node"},"gitHead":"0794566cc10e8c5a0e562823f8f8e99fa044e5f4","bugs":{"url":"https://github.com/shinnn/github-username-regex/issues"},"homepage":"https://github.com/shinnn/github-username-regex#readme","_id":"github-username-regex@1.0.0","_shasum":"17356840032f904efe8d93351c7aa7e01eff21b9","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.4.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"17356840032f904efe8d93351c7aa7e01eff21b9","tarball":"https://registry.npmjs.org/github-username-regex/-/github-username-regex-1.0.0.tgz","integrity":"sha512-EqDVkN0/5MQyDPOSDLInVRRXdeISRfcN1UW/1FUqD2knV1HHw8DndMB3UPNn5lO51DvRnjzbLXwWqNNV86PLOw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD25PSAQW/PF4sJbS2vksrx9vrUkCuLOEEgGkiG7AOLdAIgdIBXEVwCXrvSxUfuOr0GMnJ153nwLGB/CmZxrtswp4k="}]},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/github-username-regex-1.0.0.tgz_1484732459592_0.6733065978623927"}}},"readme":"# github-username-regex\n\n[![NPM version](https://img.shields.io/npm/v/github-username-regex.svg)](https://www.npmjs.com/package/github-username-regex)\n[![Bower version](https://img.shields.io/bower/v/github-username-regex.svg)](https://github.com/shinnn/github-username-regex/releases)\n[![Build Status](https://travis-ci.org/shinnn/github-username-regex.svg?branch=master)](https://travis-ci.org/shinnn/github-username-regex)\n\nA regular expression that only matches a valid [Github](https://github.com/) username\n\n```javascript\nimport githubUsernameRegex from 'github-username-regex';\n\ngithubUsernameRegex.test('john'); //=> true\ngithubUsernameRegex.test('john-due'); //=> true\ngithubUsernameRegex.test('john-due-'); //=> false\n```\n\nAccording to the form validation messages on [*Join Github*](https://github.com/join) page,\n\n* Github username may only contain alphanumeric characters or hyphens.\n* Github username cannot have multiple consecutive hyphens.\n* Github username cannot begin or end with a hyphen.\n* Maximum is 39 characters.\n\n## Installation\n\n### [npm](https://www.npmjs.com/)\n\n```\nnpm install github-username-regex\n```\n\n### [bower](https://bower.io/)\n\n```\nbower install github-username-regex\n```\n\n## API\n\n```javascript\nimport githubUsernameRegex from 'github-username-regex';\n```\n\n### githubUsernameRegex\n\nType: [`RegExp`](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions) (`/^[a-z\\d](?:[a-z\\d]|-(?=[a-z\\d])){0,38}$/i`)\n\n```javascript\n// Returns `true`\ngithubUsernameRegex.test('a');\ngithubUsernameRegex.test('0');\ngithubUsernameRegex.test('a-b');\ngithubUsernameRegex.test('a-b-123');\ngithubUsernameRegex.test('a'.repeat(39));\n\n// Returns `false`\ngithubUsernameRegex.test('');\ngithubUsernameRegex.test('a_b');\ngithubUsernameRegex.test('a--b');\ngithubUsernameRegex.test('a-b-');\ngithubUsernameRegex.test('-a-b');\ngithubUsernameRegex.test('a'.repeat(40));\n```\n\nNote that this module doesn't take reserved usernames into consideration. For example it matches `help`, `about` and `pricing`, though they are reserved words and cannot be used as Github usernames.\n\n## License\n\n[Creative Commons Zero v1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/deed)\n","maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"time":{"modified":"2022-06-18T12:34:05.841Z","created":"2017-01-17T11:07:16.414Z","0.0.0":"2017-01-17T11:07:16.414Z","1.0.0":"2017-01-18T09:40:59.810Z"},"homepage":"https://github.com/shinnn/github-username-regex#readme","keywords":["github","name","username","login","account","validate","validation","match","regex","regexp"],"repository":{"type":"git","url":"git+https://github.com/shinnn/github-username-regex.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"bugs":{"url":"https://github.com/shinnn/github-username-regex/issues"},"license":"CC0-1.0","readmeFilename":"README.md"}