{"id":17255576,"url":"https://github.com/ffmathy/fluffyspoon.javascript.nameof","last_synced_at":"2025-10-11T09:40:59.430Z","repository":{"id":83143466,"uuid":"298574485","full_name":"ffMathy/FluffySpoon.JavaScript.NameOf","owner":"ffMathy","description":null,"archived":false,"fork":false,"pushed_at":"2020-09-25T19:28:04.000Z","size":61,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T05:06:03.593Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ffMathy.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}},"created_at":"2020-09-25T13:03:23.000Z","updated_at":"2024-07-24T13:14:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"6da21c54-fa1b-484d-b481-a385f126e5a4","html_url":"https://github.com/ffMathy/FluffySpoon.JavaScript.NameOf","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"5a19dd3bbba2a5453f9dd6e499ce766784cc1239"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffMathy%2FFluffySpoon.JavaScript.NameOf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffMathy%2FFluffySpoon.JavaScript.NameOf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffMathy%2FFluffySpoon.JavaScript.NameOf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffMathy%2FFluffySpoon.JavaScript.NameOf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ffMathy","download_url":"https://codeload.github.com/ffMathy/FluffySpoon.JavaScript.NameOf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248830424,"owners_count":21168272,"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":[],"created_at":"2024-10-15T07:12:04.393Z","updated_at":"2025-10-11T09:40:54.391Z","avatar_url":"https://github.com/ffMathy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is this?\n[`@fluffy-spoon/name-of`](https://www.npmjs.com/package/@fluffy-spoon/name-of) makes it possible to get the name of a property at runtime, even if that type does not exist at runtime. Think of it as the `nameof` keyword in C#, but for TypeScript.\n\n# Installing\n`npm install @fluffy-spoon/name-of`\n\n# Usage\n```typescript\nimport { getPropertyName, getDeepPropertyName } from '@fluffy-spoon/name-of';\n\ninterface SomeType {\n  foo: boolean;\n\n  someNestedObject: {\n      bar: string;\n  }\n}\n\nconsole.log(getPropertyName\u003cSomeType\u003e(x =\u003e x.foo)); //prints \"foo\"\nconsole.log(getPropertyName\u003cSomeType\u003e(x =\u003e x.someNestedObject)); //prints \"someNestedObject\"\nconsole.log(getPropertyName\u003cSomeType\u003e(x =\u003e x.someNestedObject.bar)); //prints \"bar\"\n\nconsole.log(getDeepPropertyName\u003cSomeType\u003e(x =\u003e x.foo)); //prints \"foo\"\nconsole.log(getDeepPropertyName\u003cSomeType\u003e(x =\u003e x.someNestedObject)); //prints \"someNestedObject\"\nconsole.log(getDeepPropertyName\u003cSomeType\u003e(x =\u003e x.someNestedObject.bar)); //prints \"someNestedObject.bar\"\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fffmathy%2Ffluffyspoon.javascript.nameof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fffmathy%2Ffluffyspoon.javascript.nameof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fffmathy%2Ffluffyspoon.javascript.nameof/lists"}