Socket
Socket
Sign inDemoInstall

mjml-head-font

Package Overview
Dependencies
Maintainers
4
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mjml-head-font - npm Package Compare versions

Comparing version 3.3.0 to 4.0.0-alpha.1

27

lib/index.js

@@ -1,2 +0,2 @@

"use strict";
'use strict';

@@ -7,22 +7,13 @@ Object.defineProperty(exports, "__esModule", {

var _find = require("lodash/find");
var _createComponent = require('mjml-core/lib/createComponent');
var _find2 = _interopRequireDefault(_find);
exports.default = (0, _createComponent.createHeadComponent)('mj-font', {
tagOmission: true,
handler: function handler() {
var add = this.context.add;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = {
name: "mj-font",
endingTag: true,
handler: function handler(_ref, globalAttributes) {
var attributes = _ref.attributes;
var font = (0, _find2.default)(globalAttributes.fonts, ['name', attributes.name]);
if (font) {
font.url = attributes.href;
} else {
globalAttributes.fonts.push({ name: attributes.name, url: attributes.href });
}
add('fonts', this.getMjAttribute('name'), this.getMjAttribute('href'));
}
};
});
module.exports = exports['default'];
{
"name": "mjml-head-font",
"description": "mjml-head-font",
"version": "3.3.0",
"version": "4.0.0-alpha.1",
"main": "lib/index.js",

@@ -15,5 +15,10 @@ "repository": {

"homepage": "https://mjml.io",
"scripts": {
"clean": "../../node_modules/.bin/rimraf lib",
"build": "../../node_modules/.bin/babel src --out-dir lib"
},
"dependencies": {
"lodash": "^4.17.4"
"lodash": "^4.17.2",
"mjml-core": "^4.0.0-alpha.1"
}
}

Sorry, the diff of this file is not supported yet

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