{"id":25821166,"url":"https://github.com/consolelabs/mochi-toolkit","last_synced_at":"2026-05-14T06:34:01.538Z","repository":{"id":179401991,"uuid":"663400473","full_name":"consolelabs/mochi-toolkit","owner":"consolelabs","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-12T09:56:15.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T16:14:03.356Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/consolelabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-07-07T07:56:08.000Z","updated_at":"2023-07-07T08:37:56.000Z","dependencies_parsed_at":"2025-02-28T10:54:41.247Z","dependency_job_id":"756d977d-e7b7-4788-a937-b97224f6a871","html_url":"https://github.com/consolelabs/mochi-toolkit","commit_stats":null,"previous_names":["consolelabs/mochi-toolkit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/consolelabs/mochi-toolkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/consolelabs%2Fmochi-toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/consolelabs%2Fmochi-toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/consolelabs%2Fmochi-toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/consolelabs%2Fmochi-toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/consolelabs","download_url":"https://codeload.github.com/consolelabs/mochi-toolkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/consolelabs%2Fmochi-toolkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33013273,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-02-28T10:37:18.573Z","updated_at":"2026-05-14T06:34:01.523Z","avatar_url":"https://github.com/consolelabs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mochi Toolkit\n\n## Format number\n\n0. value \u003e= 1000, not show decimal part. \u003cbr /\u003eEx: 1000.382 -\u003e 1000\n1. 1 \u003c= value \u003c 1000, show only 2 decimals\u003cbr /\u003e\n   Ex: 23.42347 -\u003e 23.42, 100.00000153271831 -\u003e 100.00, 100.012324523 -\u003e 100.01, 100.19231123 -\u003e 100.19\n2. value \u003c 1\n\n- show to the first non-zero decimal\n- number of zero decimals \u003e 6 then show scientific number\u003cbr /\u003e\n  Ex: 0.00012435 -\u003e 0.0001, 0.0001999999 -\u003e 0.00019, 0.1999999 -\u003e 0.1\n  Ex: 0.000000000000000001 -\u003e 1e-18\n\n## Format username\n\nProfile will associate with accounts in many platform: Telegram, Discord, Web, Application,... Logic to render username is choose in current platform first, if not have then get from list fallback platform\n\n0. Platform\n\n- Context platform: where action happens -\u003e [\"web\", \"discord\", \"telegram\"]\n- Account platform: platform of all associated account -\u003e [\"app\", \"discord\", \"telegram\", \"mochi\"]\n\n1. Fallback platform order\n\n- context platform = web. fallbackOrder = [\"app\", \"mochi\", \"discord\", \"telegram\"]\n- context platform = discord. fallbackOrder = [\"app\", \"discord\", \"telegram\", \"mochi\"]\n- context platform = telegram. fallbackOrder = [\"app\", \"telegram\", \"discord\", \"mochi\"]\n\n2. Render username. Get username from context platform first, if not have then use fallback list\u003cbr /\u003e\n   Ex: profile 1 tip profile 2 on platform = \"telegram\". profile 1: {telegram - username1Tel, discord - username1Disc, username1Mochi}, profile2: {discord - username2Disc}\n   =\u003e show username1Tel and username2Disc\u003cbr /\u003e\n\n3. Prefix:\n\n- discord: \"disc:\"\n- telegram: \"tg:\"\n- app: \"app:\"\n- mochi: \"mochi:\"\n\n4. Render prefix. Base on platform and username platform\n\n- if platform = username platform -\u003e @\n- if platform != username platform -\u003e get from list prefix\u003cbr /\u003e\n  Ex: from Ex 2, platform = \"telegram\" and profile 1 = username1Tel (on telegram) and profile 2 = username2Disc (on discord)\n  =\u003e show @username1Tel and disc:username2Disc\n\n5. In step 2 and 4. If cannot get any username from fallback list =\u003e show profile_name -\u003e profile_id\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconsolelabs%2Fmochi-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconsolelabs%2Fmochi-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconsolelabs%2Fmochi-toolkit/lists"}