{"id":15809256,"url":"https://github.com/zordius/classnames-undefined","last_synced_at":"2025-03-31T23:44:51.697Z","repository":{"id":57146776,"uuid":"110766400","full_name":"zordius/classnames-undefined","owner":"zordius","description":"Wrap the classnames package for better behavior for react16","archived":false,"fork":false,"pushed_at":"2017-11-16T01:43:28.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-06T03:21:42.503Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zordius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-15T01:21:13.000Z","updated_at":"2017-11-15T01:41:10.000Z","dependencies_parsed_at":"2022-08-29T19:41:02.755Z","dependency_job_id":null,"html_url":"https://github.com/zordius/classnames-undefined","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/zordius%2Fclassnames-undefined","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zordius%2Fclassnames-undefined/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zordius%2Fclassnames-undefined/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zordius%2Fclassnames-undefined/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zordius","download_url":"https://codeload.github.com/zordius/classnames-undefined/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246558113,"owners_count":20796696,"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-05T03:21:02.865Z","updated_at":"2025-03-31T23:44:51.676Z","avatar_url":"https://github.com/zordius.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# classnames-undefined\nWrap the classnames package for better behavior for react16\n\n[![Build Status](https://travis-ci.org/zordius/classnames-undefined.svg?branch=master)](https://travis-ci.org/zordius/classnames-undefined) [![License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/zordius/classnames-undefined/blob/master/LICENSE.md) [![npm version](https://badge.fury.io/js/classnames-undefined.svg)](https://badge.fury.io/js/classnames-undefined)\n\n## Install\n```\nnpm install --save classnames-undefined\n```\n\nor\n\n```\nyarn add classnames-undefined\n```\n\n## Usage\n\nPlease refer to document of \u003ca href=\"https://www.npmjs.com/package/classnames\"\u003eclassnames\u003c/a\u003e , and we extend it with this behavior: when the return value of classnames is empty string, we turned it into `undefined`. This can help you to output better HTML when there is no classname for the elements.\n\n```\nconst cn = require('classnames')\nconsole.log(cn()) // will output empty string\n\n\nconst cu = require('classnames-undefined')\nconsole.log(cu()) // will output undefined\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzordius%2Fclassnames-undefined","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzordius%2Fclassnames-undefined","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzordius%2Fclassnames-undefined/lists"}