{"id":17728673,"url":"https://github.com/atomita/clsnm","last_synced_at":"2025-03-31T17:25:47.824Z","repository":{"id":57200922,"uuid":"193251859","full_name":"atomita/clsnm","owner":"atomita","description":"A utility function for generating a string for use as a DOM element's `className`.","archived":false,"fork":false,"pushed_at":"2019-07-02T12:43:50.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-26T03:35:18.622Z","etag":null,"topics":["class","classes","classlist","classname","classnames"],"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/atomita.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":"2019-06-22T15:52:38.000Z","updated_at":"2019-07-02T12:43:52.000Z","dependencies_parsed_at":"2022-09-15T11:22:29.261Z","dependency_job_id":null,"html_url":"https://github.com/atomita/clsnm","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomita%2Fclsnm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomita%2Fclsnm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomita%2Fclsnm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomita%2Fclsnm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atomita","download_url":"https://codeload.github.com/atomita/clsnm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246506913,"owners_count":20788737,"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","classes","classlist","classname","classnames"],"created_at":"2024-10-25T20:41:55.461Z","updated_at":"2025-03-31T17:25:47.803Z","avatar_url":"https://github.com/atomita.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clsnm\nA utility function for generating a string for use as a DOM element's `className`.\n\n\n## Install\n\n```\n$ npm install --save clsnm\n```\n\n\n## Usage\n\n```js\nimport clsnm from 'clsnm'\n\nclsnm({ foo: true, bar: false })\n//=\u003e foo\n\nclsnm({ foo: { bar: false } })\n//=\u003e foo\n\nclsnm({ foo: { bar: true, baz: true } })\n//=\u003e foobar foobaz\n\nclsnm({ foo: true, bar: { _baz: true } })\n//=\u003e foo bar_baz\n\nclsnm({ foo: { Bar: { Baz: true } } }, v =\u003e v.replace(/[A-Z]/g, v =\u003e v.toLowerCase()))\n//=\u003e foo-bar-baz\n```\n\n## License\n\nclsnm is MIT licensed. See [LICENSE](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomita%2Fclsnm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatomita%2Fclsnm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomita%2Fclsnm/lists"}