{"id":15642075,"url":"https://github.com/danakt/uuid-by-string","last_synced_at":"2025-04-06T13:11:05.159Z","repository":{"id":12140762,"uuid":"70360195","full_name":"danakt/uuid-by-string","owner":"danakt","description":"Generates the RFC-4122 Name-Based UUID","archived":false,"fork":false,"pushed_at":"2024-09-09T16:28:12.000Z","size":709,"stargazers_count":67,"open_issues_count":8,"forks_count":12,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T11:06:59.686Z","etag":null,"topics":["guid","hash","md5","rfc-4122","sha-1","uuid","uuid-by-string","v3","v5"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danakt.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-08T22:13:17.000Z","updated_at":"2024-12-17T11:14:00.000Z","dependencies_parsed_at":"2024-06-18T13:54:29.772Z","dependency_job_id":"12d2daa3-fc97-4cca-9c7a-253e58c8ea93","html_url":"https://github.com/danakt/uuid-by-string","commit_stats":{"total_commits":134,"total_committers":6,"mean_commits":"22.333333333333332","dds":0.4925373134328358,"last_synced_commit":"bae01d0e85a9f95161d8904e9e0f262098cda168"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danakt%2Fuuid-by-string","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danakt%2Fuuid-by-string/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danakt%2Fuuid-by-string/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danakt%2Fuuid-by-string/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danakt","download_url":"https://codeload.github.com/danakt/uuid-by-string/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485287,"owners_count":20946398,"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":["guid","hash","md5","rfc-4122","sha-1","uuid","uuid-by-string","v3","v5"],"created_at":"2024-10-03T11:54:11.405Z","updated_at":"2025-04-06T13:11:05.144Z","avatar_url":"https://github.com/danakt.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"uuid-by-string\n[![NPM](https://img.shields.io/npm/v/uuid-by-string.svg?style=flat-square\u0026maxAge=3600)](https://www.npmjs.com/package/uuid-by-string)\n[![Downloads](https://img.shields.io/npm/dw/uuid-by-string.svg?style=flat-square\u0026maxAge=3600)](https://www.npmjs.com/package/uuid-by-string)\n=======================\nGenerates the [RFC-4122](https://tools.ietf.org/html/rfc4122#section-4.3) Name-Based UUID. Supports 3 and 5 versions of UUID.\n\n## Installation\n\n```bash\n# via NPM\nnpm install uuid-by-string\n\n# or Yarn\nyarn add uuid-by-string\n```\n\n## Usage\n\nThe package has only one default exported method. Method receives any string and returns generated hash\n\n```js\nconst getUuid = require('uuid-by-string');\n\nconst uuidHash = getUuid('Hello world!');\n// d3486ae9-136e-5856-bc42-212385ea7970\n```\n\nThe string `Hello world!` will always returns `d3486ae9-136e-5856-bc42-212385ea7970`.\n\nYou can specify the UUID version. Available versions is 3 and 5 according to [RFC-4122](https://tools.ietf.org/html/rfc4122#section-4.3). The version is responsible for the hashing algorithm: version 3 uses MD5, and version 5 uses SHA-1. SHA-1 used by default if version is not specified.\n\n```js\nconst uuidV3Hash = getUuid('Hello world!', 3);\n// 86fb269d-190d-3c85-b6e0-468ceca42a20\n\nconst uuidV5Hash = getUuid('Hello world!', 5);\n// d3486ae9-136e-5856-bc42-212385ea7970\n```\n\n## API\n\n`getUuid(name [, version]);`\n\n`getUuid(name [, namespace, version]);`\n\n- `name` — hashing target\n- `namespace` _Optional_ — UUID namespace\n- `version` _Optional_ — 3 or 5, version of UUID\n\n## License\n\n[MIT licensed](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanakt%2Fuuid-by-string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanakt%2Fuuid-by-string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanakt%2Fuuid-by-string/lists"}