{"id":13626576,"url":"https://github.com/Hejsil/itis","last_synced_at":"2025-04-16T14:34:05.284Z","repository":{"id":39578519,"uuid":"498517931","full_name":"Hejsil/itis","owner":"Hejsil","description":"A small library for asking questions about types","archived":true,"fork":false,"pushed_at":"2024-09-13T12:17:37.000Z","size":14,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-14T02:08:30.638Z","etag":null,"topics":["metaprogramming","zig","zig-library"],"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/Hejsil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["Hejsil"]}},"created_at":"2022-05-31T22:35:55.000Z","updated_at":"2024-09-13T12:53:58.000Z","dependencies_parsed_at":"2023-02-05T23:15:57.857Z","dependency_job_id":"6b325d67-2c43-442c-a420-39700f1a46f2","html_url":"https://github.com/Hejsil/itis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hejsil%2Fitis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hejsil%2Fitis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hejsil%2Fitis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hejsil%2Fitis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hejsil","download_url":"https://codeload.github.com/Hejsil/itis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223716614,"owners_count":17191077,"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":["metaprogramming","zig","zig-library"],"created_at":"2024-08-01T21:02:24.130Z","updated_at":"2024-11-08T16:31:01.666Z","avatar_url":"https://github.com/Hejsil.png","language":"Zig","funding_links":["https://github.com/sponsors/Hejsil"],"categories":["Zig"],"sub_categories":[],"readme":"# itis\n\nA small library for asking questions about types.\n\n```zig\n/// Example serialize function that uses `itis` to serialize ArrayList and ArrayHashMap.\npub fn serialize(writer: anytype, value: anytype) !void {\n    const T = @TypeOf(value);\n    if (comptime itis.anArrayList(T)) {\n        try writer.writeAll(\"[\");\n        for (value.items) |item, i| {\n            if (i != 0)\n                try writer.writeAll(\",\");\n            try serialize(writer, item);\n        }\n        return writer.writeAll(\"]\");\n    }\n    if (comptime itis.anArrayHashMap(T)) {\n        try writer.writeAll(\"{\");\n        for (value.keys()) |key, i| {\n            const v = value.values()[i];\n            if (i != 0)\n                try writer.writeAll(\",\");\n\n            try serialize(writer, key);\n            try writer.writeAll(\":\");\n            try serialize(writer, v);\n        }\n        return writer.writeAll(\"}\");\n    }\n\n    // The rest is left as an execise for the reader\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHejsil%2Fitis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHejsil%2Fitis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHejsil%2Fitis/lists"}