{"id":15462885,"url":"https://github.com/wasm-fmt/zig_fmt","last_synced_at":"2025-04-22T10:42:46.606Z","repository":{"id":192022285,"uuid":"685823494","full_name":"wasm-fmt/zig_fmt","owner":"wasm-fmt","description":"A WASM Based Zig Formatter","archived":false,"fork":false,"pushed_at":"2025-04-18T22:36:36.000Z","size":49,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T09:16:42.971Z","etag":null,"topics":["formatter","formatting","wasm","webassembly","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/wasm-fmt.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,"zenodo":null}},"created_at":"2023-09-01T05:08:08.000Z","updated_at":"2025-03-15T18:48:37.000Z","dependencies_parsed_at":"2024-01-14T08:25:56.133Z","dependency_job_id":"fa5eb5bf-d593-4e28-b297-9898b87be8b3","html_url":"https://github.com/wasm-fmt/zig_fmt","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":"0.29032258064516125","last_synced_commit":"42bbdc4563ba055d435b5a6195ad6782eeccdf16"},"previous_names":["wasm-fmt/zig_fmt"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasm-fmt%2Fzig_fmt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasm-fmt%2Fzig_fmt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasm-fmt%2Fzig_fmt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasm-fmt%2Fzig_fmt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wasm-fmt","download_url":"https://codeload.github.com/wasm-fmt/zig_fmt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250222258,"owners_count":21394843,"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":["formatter","formatting","wasm","webassembly","zig"],"created_at":"2024-10-02T00:05:30.994Z","updated_at":"2025-04-22T10:42:46.526Z","avatar_url":"https://github.com/wasm-fmt.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Test](https://github.com/wasm-fmt/zig_fmt/actions/workflows/test.yml/badge.svg)](https://github.com/wasm-fmt/zig_fmt/actions/workflows/test.yml)\n[![npm](https://img.shields.io/npm/v/@wasm-fmt/zig_fmt)](https://www.npmjs.com/package/@wasm-fmt/zig_fmt)\n\n# Install\n\n```bash\nnpm install @wasm-fmt/zig_fmt\n```\n\n# Usage\n\n```javascript\nimport init, { format } from \"@wasm-fmt/zig_fmt\";\n\nawait init();\n\nconst input = `\nconst std = @import(\"std\");\n\npub fn main() !void \n{\n  const stdout = std.io.getStdOut().writer();\n  var i: usize = 1;\n  while (i \u003c= 16) : (i += 1) \n    {\n        if (i % 15 == 0) \n      {\n        try stdout.writeAll(\"ZiggZagg\\\\n\");\n      } else \n        if (i % 3 == 0) \n      {\n        try stdout.writeAll(\"Zigg\\\\n\");\n      } else \n        if (i % 5 == 0) \n      {\n        try stdout.writeAll(\"Zagg\\\\n\");\n      }\n        else \n      {\n        try stdout.print(\"{d}\\\\n\", .{i});\n      }\n    }\n}\n`;\n\nconst formatted = format(input);\nconsole.log(formatted);\n```\n\nFor Vite users:\n\n```JavaScript\nimport init, { format } from \"@wasm-fmt/zig_fmt/vite\";\n\n// ...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasm-fmt%2Fzig_fmt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwasm-fmt%2Fzig_fmt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasm-fmt%2Fzig_fmt/lists"}