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

mjml-head-attributes

Package Overview
Dependencies
Maintainers
1
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mjml-head-attributes - npm Package Compare versions

Comparing version 2.0.5-beta.2 to 2.0.5-beta.3

29

lib/index.js

@@ -25,18 +25,21 @@ 'use strict';

exports.default = function ($, _ref) {
var defaultAttributes = _ref.defaultAttributes;
var cssClasses = _ref.cssClasses;
exports.default = {
name: "mj-attributes",
handler: function handler($, _ref) {
var defaultAttributes = _ref.defaultAttributes;
var cssClasses = _ref.cssClasses;
(0, _each2.default)((0, _compact2.default)((0, _filter2.default)($.children, function (child) {
return child.tagName;
})), function (elem) {
var tagName = elem.tagName.toLowerCase();
var attributes = elem.attribs;
(0, _each2.default)((0, _compact2.default)((0, _filter2.default)($.children, function (child) {
return child.tagName;
})), function (elem) {
var tagName = elem.tagName.toLowerCase();
var attributes = elem.attribs;
if (tagName === 'mj-class') {
return cssClasses[attributes.name] = (0, _omit2.default)(attributes, ['name']);
}
if (tagName === 'mj-class') {
return cssClasses[attributes.name] = (0, _omit2.default)(attributes, ['name']);
}
defaultAttributes[tagName] = attributes;
});
defaultAttributes[tagName] = attributes;
});
}
};
{
"name": "mjml-head-attributes",
"description": "mjml-head-attributes",
"version": "2.0.5-beta.2",
"version": "2.0.5-beta.3",
"main": "lib/index.js",

@@ -6,0 +6,0 @@ "repository": {

@@ -35,3 +35,7 @@ ## mjml-head-attributes

<aside class="notice">
You can use mj-all to set default attributes for every components inside your MJML document
</aside>
<aside class="notice">
Note that the apply order of attributes is: inline attributes, then classes, then default mj-attributes and then defaultMJMLDefinition
</aside>
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