{"id":15355507,"url":"https://github.com/mattipv4/do_username","last_synced_at":"2025-07-03T08:07:39.862Z","repository":{"id":56595091,"uuid":"306391920","full_name":"MattIPv4/do_username","owner":"MattIPv4","description":"A DigitalOcean-community-themed username generator. Implemented in Ruby, JavaScript and Rust.","archived":false,"fork":false,"pushed_at":"2022-12-16T21:39:00.000Z","size":206,"stargazers_count":15,"open_issues_count":3,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-18T14:04:53.393Z","etag":null,"topics":["digitalocean","digitalocean-community-tools","hacktoberfest","javascript","javascript-library","npm-module","npm-package","ruby","ruby-gem","rubygem","username","username-generator"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MattIPv4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-22T16:09:08.000Z","updated_at":"2024-03-18T09:29:04.000Z","dependencies_parsed_at":"2022-08-15T21:40:17.760Z","dependency_job_id":null,"html_url":"https://github.com/MattIPv4/do_username","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/MattIPv4/do_username","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattIPv4%2Fdo_username","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattIPv4%2Fdo_username/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattIPv4%2Fdo_username/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattIPv4%2Fdo_username/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MattIPv4","download_url":"https://codeload.github.com/MattIPv4/do_username/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattIPv4%2Fdo_username/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263287864,"owners_count":23443084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["digitalocean","digitalocean-community-tools","hacktoberfest","javascript","javascript-library","npm-module","npm-package","ruby","ruby-gem","rubygem","username","username-generator"],"created_at":"2024-10-01T12:24:38.115Z","updated_at":"2025-07-03T08:07:39.837Z","avatar_url":"https://github.com/MattIPv4.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# do_username\n\nA DigitalOcean-community-themed username generator.\n\n## Implementations\n\n### Ruby\n\n[README](ruby/README.md)\n\nhttps://rubygems.org/gems/do_username\n\n`gem install do_username`\n\n### JavaScript\n\n[README](javascript/README.md)\n\nhttps://www.npmjs.com/package/do_username\n\n`npm install do_username`\n\n### Rust\n\n[README](rust/README.md)\n\nhttps://crates.io/crates/do_username\n\n`do_username = \"1.0.0\"`\n\n### Go\n\n[README](go/README.md)\n\n`go get github.com/MattIPv4/do_username/go`\n\n### Interface\n\nThe [Ruby gem](ruby) acts as the main implementation, with all other\nimplementations porting and mirroring the interface that the Ruby gem offers.\n\nAll implementations will provide the `generate` method. This method shall have a\nsingle, *optional* argument that defines the maximum (inclusive) size of the\ngenerated username. The default value for this argument shall be `30`.\n\nAll implementations will provide a set of (frozen) constants  that are arrays of\nstrings, with all the parts used randomly during username generation:\n\n- `SEA_CREATURES`, all the creature *nouns*.\n- `SEA_OBJECTS`, all the misc. object *nouns*.\n- `ADJECTIVE_DESCRIPTORS`, *descriptors* for all nouns (creatures + objects).\n- `SIZE_DESCRIPTORS`, *descriptors* for all nouns (creatures + objects).\n- `CREATURE_DESCRIPTORS`, *descriptors* specific to creature nouns.\n- `SEA_LIST`, a combination of the creature + object *nouns*.\n- `DESCRIPTORS`, a combination of the generic (adjective + size) *descriptors*.\n- `COLORS`, all possible (sea-related) *colors*.\n\nAll generated usernames will be in CamelCase with no whitespace present.\nUsernames are formed from 1 to 3 parts, a random `noun`, a random `descriptor`,\nand a random `color`. Each constituent part should have the first character set\nto uppercase by the implementation, with all subsequent characters having their\ncase preserved from the source string (e.g. `scubaDiver` -\u003e `ScubaDiver`). These\nparts are concatenated to form the final username with the following strategy:\n\n1. If the combination of `descriptor + color + noun` is less than or equal to\nthe max length, return that value.\n2. Else, if the combination of `descriptor + noun` is less than or equal to the\nmax length, return that value.\n3. Else, if the combination of `color + noun` is less than or equal to the max\nlength, return that value.\n4. Else, return just the `noun`, trimmed to the max length set (may be the full\nstring).\n\nBoth the `generate` method and the constants should be provided as part of a\nmodule (or as static methods/constants in a class) named `DOUsername`, such that\nthe method can be accessed via `DOUsername.generate`, where appropriate.\n\n## License\n\nThis project is licensed under [Apache 2.0](LICENSE) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattipv4%2Fdo_username","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattipv4%2Fdo_username","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattipv4%2Fdo_username/lists"}