{"id":18435885,"url":"https://github.com/darekf77/typescript-class-helpers","last_synced_at":"2025-04-07T20:32:28.993Z","repository":{"id":49763178,"uuid":"163870737","full_name":"darekf77/typescript-class-helpers","owner":"darekf77","description":"OOP in typescript class.name based.","archived":false,"fork":false,"pushed_at":"2024-05-22T04:24:49.000Z","size":6351,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-22T12:39:55.868Z","etag":null,"topics":["best-practises","class-names","helpers-library","javascript-minification","object-oriented-programming"],"latest_commit_sha":null,"homepage":"","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/darekf77.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}},"created_at":"2019-01-02T17:40:20.000Z","updated_at":"2024-06-01T18:08:21.930Z","dependencies_parsed_at":"2023-02-16T09:35:26.168Z","dependency_job_id":"adc3cab6-35f5-4ea7-bf54-55066b5deaf2","html_url":"https://github.com/darekf77/typescript-class-helpers","commit_stats":{"total_commits":306,"total_committers":3,"mean_commits":102.0,"dds":"0.20915032679738566","last_synced_commit":"949077a9de351086f77b9f49ddbf73ef37ee177e"},"previous_names":[],"tags_count":123,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darekf77%2Ftypescript-class-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darekf77%2Ftypescript-class-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darekf77%2Ftypescript-class-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darekf77%2Ftypescript-class-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darekf77","download_url":"https://codeload.github.com/darekf77/typescript-class-helpers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247725536,"owners_count":20985722,"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":["best-practises","class-names","helpers-library","javascript-minification","object-oriented-programming"],"created_at":"2024-11-06T06:09:35.407Z","updated_at":"2025-04-07T20:32:24.262Z","avatar_url":"https://github.com/darekf77.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# firedev-class-helpers (typescript-class-helpers)\n\n- Part of [firedev.io](https://github.com/darekf77/firedev)\n- Helpers for OOP (Object Oriented Programming) in TypeScript.\n- Keep classnames metadata when minifying code (uglifyjs, webpack)\n- Purpose:\n  + take advantage of classes in TypeScript/JavaScript in most glegant way\n  + prevent unusable class names during JS minification\n\n## Installation:\n```\nnpm i typescript-class-helpers\n```\n\n## Class manipulations (in nodejs)\n\n```ts\nimport { CLASS } from 'typescript-class-helpers';\n\n@CLASS.NAME('Example')\nclass Example {\n\n}\n    \nconsole.log(CLASS.getName(Example) === 'Example') // true\nconsole.log(CLASS.getNameFromObject(new Example()) === 'Example') // true\nconsole.log(CLASS.getBy('Example') === Example) // true\n```\n\n## Class manipulations (in browser)\n\n```ts\nimport { CLASS } from 'typescript-class-helpers/browser';\n\n@CLASS.NAME('Example')\nclass Example {\n\n}\n    \nconsole.log(CLASS.getName(Example) === 'Example') // true\nconsole.log(CLASS.getNameFromObject(new Example()) === 'Example') // true\nconsole.log(CLASS.getBy('Example') === Example) // true\n```\n\nThis way you can use you class names even after uglify process.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarekf77%2Ftypescript-class-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarekf77%2Ftypescript-class-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarekf77%2Ftypescript-class-helpers/lists"}