{"id":27002939,"url":"https://github.com/garystorey/cssclass","last_synced_at":"2026-05-10T02:52:14.056Z","repository":{"id":44136537,"uuid":"307513800","full_name":"garystorey/cssclass","owner":"garystorey","description":"A small dependency-free utility to combine css classes written in TypeScript","archived":false,"fork":false,"pushed_at":"2022-07-27T06:02:09.000Z","size":584,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T19:04:10.859Z","etag":null,"topics":["class","classlist","classnames","css"],"latest_commit_sha":null,"homepage":"","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/garystorey.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":"2020-10-26T21:53:16.000Z","updated_at":"2022-07-08T17:47:21.000Z","dependencies_parsed_at":"2022-09-11T23:12:29.431Z","dependency_job_id":null,"html_url":"https://github.com/garystorey/cssclass","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garystorey%2Fcssclass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garystorey%2Fcssclass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garystorey%2Fcssclass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garystorey%2Fcssclass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garystorey","download_url":"https://codeload.github.com/garystorey/cssclass/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247123087,"owners_count":20887261,"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":["class","classlist","classnames","css"],"created_at":"2025-04-04T05:14:30.371Z","updated_at":"2026-05-10T02:52:14.025Z","avatar_url":"https://github.com/garystorey.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cssclass\n\nA small dependency-free utility to combine css classes written in TypeScript.\n\n![Version](https://img.shields.io/github/package-json/v/garystorey/cssclass)\n![Size](https://img.shields.io/bundlephobia/min/@garystorey/cssclass)\n![License](https://img.shields.io/npm/l/@garystorey/cssclass)\n\n![Leywords](https://img.shields.io/github/package-json/keywords/garystorey/cssclass)\n\n## Installation\n\nYou can install either with `npm` or `yarn`:\n\n```js\nnpm install @garystorey/cssclass\n\nyarn add @garystorey/cssclass\n```\n\n## Usage\n\nExample in JavaScript:\n\n```js\nimport cssclass from '@garystorey/cssclass'\n\nconst value = 1\nconst classes = cssclass(`default`, {\n  notadded: value === 0,\n  added: value === 1,\n})\nconsole.log(classes)\n// \"default added\"\n```\n\nSince `cssclass` is written in TypeScript, it includes its own types.\n\n```ts\nimport { cssclass, CSSClassObject } from '@garystorey/cssclass'\n\nconst classObject: CSSClassObject = {\n  notadded: value === 0,\n  added: value === 1,\n}\n\nconst value: number = 1\nconst classes = cssclass('default', classObject)\nconsole.log(classes)\n// \"default added\"\n```\n\nYou can see it in action [on this CodeSandbox](https://codesandbox.io/s/cssclass-example-w1og5).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarystorey%2Fcssclass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarystorey%2Fcssclass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarystorey%2Fcssclass/lists"}