{"id":23705475,"url":"https://github.com/r-unic/flamework-meta-utility","last_synced_at":"2026-03-15T09:22:04.788Z","repository":{"id":266828645,"uuid":"898048149","full_name":"R-unic/flamework-meta-utility","owner":"R-unic","description":"Metadata utility for Flamework","archived":false,"fork":false,"pushed_at":"2025-06-23T21:11:42.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-29T23:10:41.832Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/R-unic.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,"zenodo":null}},"created_at":"2024-12-03T17:37:00.000Z","updated_at":"2025-06-23T21:11:46.000Z","dependencies_parsed_at":"2024-12-06T11:36:05.900Z","dependency_job_id":"0c04f262-2a95-4370-b08a-e5318a09a86b","html_url":"https://github.com/R-unic/flamework-meta-utility","commit_stats":null,"previous_names":["r-unic/flamework-instance-utility","r-unic/flamework-meta-utility"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/R-unic/flamework-meta-utility","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R-unic%2Fflamework-meta-utility","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R-unic%2Fflamework-meta-utility/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R-unic%2Fflamework-meta-utility/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R-unic%2Fflamework-meta-utility/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/R-unic","download_url":"https://codeload.github.com/R-unic/flamework-meta-utility/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R-unic%2Fflamework-meta-utility/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273430350,"owners_count":25104479,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"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":"2024-12-30T14:37:07.691Z","updated_at":"2026-03-15T09:21:59.731Z","avatar_url":"https://github.com/R-unic.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @rbxts/flamework-meta-utils\n\nMetadata utility and utility macros for Flamework\n\n## Macros\n\n### enumKey\u0026lt; E, V\u0026gt; ()\n\nRetrieves the key associated with a const (or non-const) enum value\n\n```ts\nconst enum Abc {\n  A,\n  B,\n  C\n}\n\nconst a = enumKey\u003ctypeof Abc, Abc.A\u003e();\n```\n\nCompiles to\n\n```lua\nlocal a = \"A\";\n```\n\n### deunify\u0026lt; T\u0026gt; ()\n\nDeunifies a union type `T` into an array of all constituents\n\n```ts\nconst constituents = deunify\u003c\"a\" | \"b\" | \"c\"\u003e();\n```\n\nCompiles to\n\n```lua\nlocal constituents = deunify({\"a\", \"b\", \"c\"}); -- which returns the passed param\n```\n\n### repeatString\u0026lt; S, N\u0026gt; ()\n\nRepeats the string `S`  `N` times.\n\n```ts\nconst line = repeatString\u003c\"-\", 30\u003e();\n```\n\nCompiles to\n\n```lua\nlocal line = \"------------------------------\";\n```\n\n### getChildrenOfType\u0026lt; T\u0026gt; ()\n\nGenerates a type guard (if one is not specified) and returns all children of the given instance that pass the guard.\n\n```ts\ninterface CharacterModel extends Model {\n  Humanoid: Humanoid;\n  HumanoidRootPart: Part;\n}\n\nconst characters = getChildrenOfType\u003cCharacterModel\u003e(Workspace.Characters);\n```\n\n### getDescendantsOfType\u0026lt; T\u0026gt; ()\n\nGenerates a type guard (if one is not specified) and returns all descendants of the given instance that pass the guard.\n\n```ts\nconst assetsToPreload = getDescendantsOfType\u003cDecal | Texture | MeshPart\u003e(ReplicatedStorage);\n```\n\n### getInstanceAtPath()\n\nResolves the instance at the given path using Rojo\n\n```ts\nconst module = getInstanceAtPath(\"src/client/controllers/mouse.ts\");\n```\n\n### safeCast\u0026lt; T\u0026gt; ()\n\nGenerates a type guard (if one is not specified) and if the guard passes, returns the casted value. Otherwise returns undefined.\n\n```ts\nconst value = safeCast\u003cnumber\u003e(someUnknownValue);\nif (value !== undefined)\n  print(\"doubled value:\", value * 2);\n```\n\n```ts\ninterface CharacterModel extends Model {\n  Humanoid: Humanoid;\n  HumanoidRootPart: Part;\n}\n\nconst character = safeCast\u003cCharacterModel\u003e(Players.LocalPlayer.Character);\nif (character !== undefined)\n  print(\"character root:\", character.HumanoidRootPart);\n```\n\n## Methods\n\nThese next three methods are generally used in combination with decorators.\n\n### resolveDependencies()\n\nTakes a constructor and resolves it and all of it's dependencies\n\n### processDependencies()\n\nCalls the provided method for each dependency resolved from the provided constructor\n\n### callMethodOnDependencies()\n\nCalls the method from the provided method descriptor for each dependency resolved from the provided constructor\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-unic%2Fflamework-meta-utility","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr-unic%2Fflamework-meta-utility","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-unic%2Fflamework-meta-utility/lists"}