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

class-prefixer

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

class-prefixer - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

7

index.js

@@ -17,3 +17,8 @@ var classNames = require('classnames');

mainClass = mainClass || '';
stateClass = stateClass || '';
if (typeof stateClass === 'boolean') {
defaultPrefix = stateClass;
stateClass = '';
} else {
stateClass = stateClass || '';
}
mainClass = typeof mainClass !== 'string' ? classNames(mainClass) : mainClass.trim();

@@ -20,0 +25,0 @@ stateClass = typeof stateClass !== 'string' ? classNames(stateClass) : stateClass.split(' ').filter(emptyFilter).join(' ').trim();

2

package.json
{
"name": "class-prefixer",
"version": "0.2.0",
"version": "0.2.1",
"description": "clsssName prefixer",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -27,3 +27,6 @@ # className

cls('a') // pre-next-a
// add default prefix
cls('a', true).should.eql('pre pre-a');
cls('a', 'b', true).should.eql('pre pre-a b');
```

@@ -30,0 +33,0 @@

@@ -35,6 +35,7 @@ require('should');

var cls = className('pre');
cls('a', '', true).should.eql('pre pre-a');
cls('', '', true).should.eql('pre');
cls('', 'a', true).should.eql('pre a');
cls('a', true).should.eql('pre pre-a');
cls('a', 'b', true).should.eql('pre pre-a b');
cls('', 'b', true).should.eql('pre b');
cls('', true).should.eql('pre');
});
});
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