{"id":16726900,"url":"https://github.com/lpil/glue","last_synced_at":"2026-02-01T12:34:58.865Z","repository":{"id":164911416,"uuid":"640329201","full_name":"lpil/glue","owner":"lpil","description":"🩹 Generate functions from your Gleam code!","archived":false,"fork":false,"pushed_at":"2024-12-08T14:20:49.000Z","size":12,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-20T03:44:33.971Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Gleam","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/lpil.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-05-13T18:12:52.000Z","updated_at":"2025-02-25T16:03:24.000Z","dependencies_parsed_at":"2025-03-15T15:43:48.669Z","dependency_job_id":"d89adb47-7406-4cbd-8bb6-7a102a551c44","html_url":"https://github.com/lpil/glue","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/lpil/glue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fglue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fglue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fglue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fglue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lpil","download_url":"https://codeload.github.com/lpil/glue/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fglue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28978177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T12:13:08.691Z","status":"ssl_error","status_checked_at":"2026-02-01T12:13:08.356Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-10-12T22:55:04.357Z","updated_at":"2026-02-01T12:34:58.718Z","avatar_url":"https://github.com/lpil.png","language":"Gleam","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glue\n\n[![Package Version](https://img.shields.io/hexpm/v/glue)](https://hex.pm/packages/glue)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/glue/)\n\nA package for generating functions from your Gleam code!\n\n## Generators\n\n- [compare](#compare)\n- [list_variants](#list_variants)\n\n### compare\n\nGiven a module containing this type:\n\n```gleam\npub type LogLevel {\n  Debug\n  Info\n  Warn\n  Error\n}\n```\n\nThis generator will generate the following function:\n\n```gleam\npub fn compare_log_level(a: LogLevel, b: LogLevel) -\u003e Order {\n  let to_int = fn(x) {\n    case x {\n      Debug -\u003e 0\n      Info -\u003e 1\n      Warn -\u003e 2\n      Error -\u003e 3\n    }\n  }\n  int.compare(to_int(a), to_int(b))\n}\n```\n\n### list_variants\n\nGiven a module containing this type:\n\n```gleam\npub type Direction {\n  North\n  East\n  South\n  West\n}\n```\n\nThis generator will generate the following function:\n\n```gleam\npub fn direction_list() -\u003e List(Direction) {\n  [North, East, South, West]\n}\n```\n\n\n## Installation\n\nAdd the package to your Gleam project\n\n```sh\ngleam add glue\n```\n\nAPI documentation can be found at \u003chttps://hexdocs.pm/glue\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpil%2Fglue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpil%2Fglue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpil%2Fglue/lists"}