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

class-lib

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

class-lib - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

package.json
{
"name": "class-lib",
"version": "0.0.3",
"version": "0.0.4",
"description": "ClassName Library",

@@ -5,0 +5,0 @@ "repository": "react-atomic/react-atomic-organism",

ClassName Library
===============
Better classname tool, especially more make sense for reactjs that change all first parameters to pure class string.
* GIT

@@ -8,1 +9,21 @@ * https://github.com/react-atomic/react-atomic-organism/tree/master/packages/lib/class-lib

## Functions
* hasClass( rawClass, newName )
* Ex: rawClass = "a b c"
* hasClass(rawClass, "d") // return false
* hasClass(rawClass, "a") // return true
* removeClass( rawClass, newName )
* Ex: rawClass = "a b c"
* removeClass(rawClass, "a"); // return "b c"
* mixClass( rawClass, newName )
* Ex. rawClass = "a b c"
* mixClass(rawClass, "d"); // return "a b c d"
* mixClass(rawClass, "d", "e"); // return "a b c d e"
* mixClass(rawClass, {d: false, e: true}); // return "a b c e"
* toggleClass( rawClass, newName )
* Ex. rawClass = "a b c"
* toggleClass(rawClass, "d"); //return "a b c d"
* toggleClass(rawClass, "c"); //return "a b c"
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