New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-jss-simple

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-jss-simple - npm Package Compare versions

Comparing version 0.2.0 to 0.2.2

10

lib/index.js

@@ -14,9 +14,7 @@ 'use strict';

var CallVisitor = {
CallExpression: function CallExpression(path, _ref2) {
var name = _ref2.name;
CallExpression: function CallExpression(path, state) {
var node = path.node;
if (node.callee.name === name && node.arguments.length === 1) {
path.replaceWith(t.callExpression(t.identifier(name), [node.arguments[0], t.identifier('__filename')]));
if (node.callee.name === state.name && node.arguments.length === 1) {
path.replaceWith(t.callExpression(t.identifier(state.name), [node.arguments[0], t.binaryExpression('+', t.identifier('__filename'), t.stringLiteral('_' + state.idx++))]));
}

@@ -35,3 +33,3 @@ }

if (t.isImportDefaultSpecifier(spec)) {
path.parentPath.traverse(CallVisitor, { name: spec.local.name });
path.parentPath.traverse(CallVisitor, { name: spec.local.name, idx: 1 });
}

@@ -38,0 +36,0 @@ });

2

package.json

@@ -5,3 +5,3 @@ {

"repository": "git://github.com/ashaffer/babel-plugin-jss-simple.git",
"version": "0.2.0",
"version": "0.2.2",
"license": "MIT",

@@ -8,0 +8,0 @@ "main": "lib/index.js",

@@ -35,3 +35,3 @@

}
})
}, __filename)
```

@@ -47,4 +47,8 @@

## Can I use `css` more than once in a given file?
Yes. Each instance of the call will be keyed separately, with `_<n>` being suffixed to the file name key.
## License
MIT
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