{"id":16401504,"url":"https://github.com/hawkkiller/snowflaker","last_synced_at":"2025-04-11T05:14:36.279Z","repository":{"id":173719938,"uuid":"651176129","full_name":"hawkkiller/snowflaker","owner":"hawkkiller","description":"  Twitter's snowflake algorithm implementation in Dart.   The Snowflake algorithm is a unique ID generator that was originally developed by Twitter.    The algorithm generates 64-bit IDs that are composed of a timestamp, a worker ID, and a sequence number.","archived":false,"fork":false,"pushed_at":"2023-06-26T10:34:19.000Z","size":46,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T05:14:31.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/snowflaker","language":"Dart","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/hawkkiller.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-06-08T17:04:26.000Z","updated_at":"2024-09-16T16:15:34.000Z","dependencies_parsed_at":"2023-07-13T21:16:35.536Z","dependency_job_id":null,"html_url":"https://github.com/hawkkiller/snowflaker","commit_stats":{"total_commits":20,"total_committers":2,"mean_commits":10.0,"dds":"0.050000000000000044","last_synced_commit":"f595ce3b6b441334c52f6e299b9d2b1f2839db35"},"previous_names":["hawkkiller/snowflake","hawkkiller/snowflaker"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hawkkiller%2Fsnowflaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hawkkiller%2Fsnowflaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hawkkiller%2Fsnowflaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hawkkiller%2Fsnowflaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hawkkiller","download_url":"https://codeload.github.com/hawkkiller/snowflaker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345268,"owners_count":21088245,"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-10-11T05:43:19.000Z","updated_at":"2025-04-11T05:14:36.269Z","avatar_url":"https://github.com/hawkkiller.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Snowflake ID Generator\n\nA Dart library for generating unique, sortable ID strings using the Twitter's Snowflake algorithm.\n\n## Features\n\n* Thread-safe generation of unique IDs.\n* Each ID contains a timestamp with millisecond precision.\n* Customizable worker and datacenter identifiers.\n\n## Usage\n\nAdd the following to your `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  snowflaker: ^1.0.0\n```\n\nThen import the library:\n\n```dart\nimport 'package:snowflaker/snowflaker.dart';\n```\n\nTo generate a new ID, create a new instance of `snowflaker` and call its `nextId()` method:\n\n```dart\n\n// Create a new instance of snowflaker with a worker ID of 1 and a datacenter ID of 1.\nfinal snowflaker = Snowflaker(workerId: 1, datacenterId: 1);\n\n// Generate a new ID.\nfinal id = snowflaker.nextId();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhawkkiller%2Fsnowflaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhawkkiller%2Fsnowflaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhawkkiller%2Fsnowflaker/lists"}