{"id":19044614,"url":"https://github.com/bubao/cherry-id-js","last_synced_at":"2026-01-17T22:52:22.041Z","repository":{"id":57197800,"uuid":"374157276","full_name":"bubao/cherry-id-js","owner":"bubao","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-29T14:13:55.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-11T09:05:14.384Z","etag":null,"topics":["nodejs"],"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/bubao.png","metadata":{"files":{"readme":"README.cn.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":"2021-06-05T16:07:06.000Z","updated_at":"2024-10-16T06:37:12.000Z","dependencies_parsed_at":"2022-09-16T13:12:22.557Z","dependency_job_id":null,"html_url":"https://github.com/bubao/cherry-id-js","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bubao%2Fcherry-id-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bubao%2Fcherry-id-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bubao%2Fcherry-id-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bubao%2Fcherry-id-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bubao","download_url":"https://codeload.github.com/bubao/cherry-id-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246919798,"owners_count":20855066,"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":["nodejs"],"created_at":"2024-11-08T22:46:52.881Z","updated_at":"2026-01-17T22:52:22.008Z","avatar_url":"https://github.com/bubao.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n * @Description: \n * @author: bubao\n * @Date: 2021-06-07 14:44:04\n * @LastEditors: bubao\n * @LastEditTime: 2021-06-29 13:24:12\n--\u003e\n\n# 🌸 cherry-id\n\n[![NPM version](https://img.shields.io/npm/v/cherry-id.svg)](https://www.npmjs.com/package/cherry-id) [![jaywcjlove/sb](https://jaywcjlove.github.io/sb/lang/english.svg)](README.md)\n\n## 介绍\n\n核心算法版权属于 [yitter](https://github.com/yitter)\n\n项目更多介绍参照：[https://github.com/yitter/IdGenerator](https://github.com/yitter/IdGenerator)\n\n## 使用\n\n```js\nconst GenId = require('cherry-id');\nconst genid = new GenId({ WorkerId: (process.argv[2] || 1) - 0 });\n\n(() =\u003e {\n  console.time(\"Test Run\");\n  const HSet = new Set();\n  for (let index = 0; index \u003c 500000; index++) {\n    HSet.add(genid.NextId());\n  }\n  console.timeEnd(\"Test Run\");\n  console.log([...HSet.values()].join(\"\\n\"))\n  console.log(HSet.size);\n})();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbubao%2Fcherry-id-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbubao%2Fcherry-id-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbubao%2Fcherry-id-js/lists"}