Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

classnames-undefined

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

classnames-undefined

Wrap the classnames package for better behavior for react16

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
50
decreased by-20.63%
Maintainers
1
Weekly downloads
 
Created
Source

classnames-undefined

Wrap the classnames package for better behavior for react16

Build Status License

Install

npm install --save classnames-undefined

or

yarn add classnames-undefined

Usage

Please refer to document of classnames , 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.

const cn = require('classnames')
console.log(cn()) // will output empty string


const cu = require('classnames-undefined')
console.log(cu()) // will output undefined

Keywords

FAQs

Package last updated on 15 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc