{"id":13525792,"url":"https://github.com/ryouaki/lsp-uuid","last_synced_at":"2025-06-16T19:35:44.982Z","repository":{"id":45962497,"uuid":"410708230","full_name":"ryouaki/lsp-uuid","owner":"ryouaki","description":"A powerful, fast, small uuid generator for both Browser and Nodejs. Keep sequence and can be deserialized.","archived":false,"fork":false,"pushed_at":"2024-04-22T02:57:05.000Z","size":199,"stargazers_count":32,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T18:14:30.266Z","etag":null,"topics":[],"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/ryouaki.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}},"created_at":"2021-09-27T01:44:04.000Z","updated_at":"2024-09-11T14:49:28.000Z","dependencies_parsed_at":"2024-01-13T22:55:24.328Z","dependency_job_id":"a7de2724-2acc-4245-b741-63663d48b09c","html_url":"https://github.com/ryouaki/lsp-uuid","commit_stats":{"total_commits":24,"total_committers":1,"mean_commits":24.0,"dds":0.0,"last_synced_commit":"077b1a586121560eb566fe11fdae8e675618d7e0"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryouaki%2Flsp-uuid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryouaki%2Flsp-uuid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryouaki%2Flsp-uuid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryouaki%2Flsp-uuid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryouaki","download_url":"https://codeload.github.com/ryouaki/lsp-uuid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248758418,"owners_count":21156957,"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":[],"created_at":"2024-08-01T06:01:22.144Z","updated_at":"2025-04-13T18:14:38.965Z","avatar_url":"https://github.com/ryouaki.png","language":"JavaScript","funding_links":[],"categories":["Repository"],"sub_categories":["Text/String"],"readme":"# lsp-uuid\nA powerful, fast and small uuid generator based on `SnowFlake` for both Browser and Nodejs. Keep sequence and can be deserialized.\n\n## Why lsp-uuid\nlsp-uuid has this features below:\n- up to 65536 different ids in one second.\n- keep sequence.\n- id‘s length is 15. less than others. Server side is 29.\n- can be deserialized.\n- no dependencies.\n- less than 1kb.\n- can work both for borwser and node side.\n- keep unique on distribute system.\n\n## Benchmark\n| lsp-uuid | random-32char | random-hex32 | random-32 | random-16 | lsp-uuid(server) |\n| -- | -- | -- | -- | -- | -- |\n| 55330ms/billion | 214773ms/billion | 116751ms/billion | 50055ms/billion | 60735ms/billion | 55061ms/billion |\n\n## How to use\n\n### Using npm\n```sh\n    $ npm install lsp-uuid -save\n```\n\n### Using Browser\n```html\n    \u003cscript src=\"https://unpkg.com/lsp-uuid@3.1.2/dist/lsp-uuid.umd.js\"\u003e\u003c/script\u003e\n```\n\n### For es module\n```js\n    import { uuid, parse } from 'lsp-uuid'\n    import { s_uuid } from 'lsp-uuid/server'\n\n    const id = uuid() // 5f095641fe00000\n    const suid = s_uuid() // ab04f349e710000-0a1a670d-af79\n    parse(id) // {flg: 0, timestamp: 1632714164216, count: 0}\n```\n\n## For CDN and Browser\n```html\n    \u003chtml\u003e\n    \u003cscript src=\"https://unpkg.com/lsp-uuid@3.1.2/dist/lsp-uuid.umd.js\"\u003e\u003c/script\u003e\n    \u003cscript\u003e\n      \n    \u003c/script\u003e\n    \u003cbody\u003e\n        const id = lspUUID.uuid() // 5f095641fe00000\n        lspUUID.parse(id) // {flg: 0, timestamp: 1632714164216, count: 0}\n    \u003c/body\u003e\n  \u003c/html\u003e\n```\n\n# Who use?\n\u003cdiv align=\"left\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/9922563/219527755-11fd6fcc-cfd7-4ac3-aedb-6f37822f6dd3.png\" width=\"150\" height=\"140\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/9922563/219527907-c2ff23c1-47fa-448d-925a-91b1b1892b32.png\" width=\"150\" height=\"140\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/9922563/219528457-d3c74709-4d7c-4857-be99-1dee5982a16f.png\" width=\"150\" height=\"140\"\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryouaki%2Flsp-uuid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryouaki%2Flsp-uuid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryouaki%2Flsp-uuid/lists"}