{"id":18358824,"url":"https://github.com/uppercod/as-cn","last_synced_at":"2025-04-10T03:02:21.618Z","repository":{"id":57184497,"uuid":"116974613","full_name":"UpperCod/as-cn","owner":"UpperCod","description":"🎁 This small function allows you to manage class names","archived":false,"fork":false,"pushed_at":"2018-01-19T18:07:55.000Z","size":35,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-18T17:36:48.292Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UpperCod.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}},"created_at":"2018-01-10T15:23:03.000Z","updated_at":"2019-03-30T06:35:57.000Z","dependencies_parsed_at":"2022-09-14T09:00:52.963Z","dependency_job_id":null,"html_url":"https://github.com/UpperCod/as-cn","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/UpperCod%2Fas-cn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpperCod%2Fas-cn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpperCod%2Fas-cn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpperCod%2Fas-cn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UpperCod","download_url":"https://codeload.github.com/UpperCod/as-cn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248148223,"owners_count":21055547,"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-11-05T22:19:37.373Z","updated_at":"2025-04-10T03:02:21.572Z","avatar_url":"https://github.com/UpperCod.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# as-cn\n\nThis small function allows you to manage class names\n\n## Mode 1\n\nIn this way, you can extract names of an object using the index, which has a definition check.\n\n``` javascript\n\nimport {h}   from 'preact';\nimport cn    from 'as-cn';\nimport './style.css';\n\nexport default function(){\n   return \u003cdiv class={\n           cn({\n               box : true\n           })\n       }\u003e\n   \u003c/div\u003e\n}\n\n// \u003cdiv class=\"box\"\u003e\u003c/div\u003e\n```\n\n## Mode 2\n\nIn this way you can extract names of a module by means of a parallel object that points to\neach property of the module object.\n\n``` javascript\n\nimport {h}   from 'preact';\nimport cn    from 'as-cn';\nimport style from './style.css';\n\nexport default function(){\n   return \u003cdiv class={\n           cn(style,{\n               box : true\n           })\n       }\u003e\n   \u003c/div\u003e\n}\n// \u003cdiv class=\"box\"\u003e\u003c/div\u003e\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuppercod%2Fas-cn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuppercod%2Fas-cn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuppercod%2Fas-cn/lists"}