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

babel-plugin-mithril-add-data-attribute

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-mithril-add-data-attribute - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

28

lib/index.js

@@ -7,8 +7,5 @@ "use strict";

exports.default = babelPluginMithrilComponentDataAttrs;
exports.testTransform = void 0;
var _path = require("path");
var _babelCore = require("babel-core");
const DATA_ATTRIBUTE = "data-component";

@@ -223,25 +220,2 @@

};
} // used for test and development
const testTransform = (code, pluginOptions = {}, transformOptions = {}) => {
var _result$code;
if (!code) {
return "";
}
const result = (0, _babelCore.transform)(code, {
babelrc: false,
plugins: [babelPluginMithrilComponentDataAttrs, pluginOptions],
parserOpts: {
plugins: []
},
...transformOptions
});
return ((_result$code = result.code) === null || _result$code === void 0 ? void 0 : _result$code.trim()) || "";
};
exports.testTransform = testTransform;
const test = testTransform("const MyComponent = () => m('div');");
test;
}

2

package.json
{
"name": "babel-plugin-mithril-add-data-attribute",
"version": "1.0.0",
"version": "1.0.1",
"description": "Babel plugin adds attributes to m() components - intended for development. Helps debug - find your components in a large repo. Adds component name and file to component data attributes which will be visible in the generated HTML.",

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

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