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

remixml

Package Overview
Dependencies
Maintainers
1
Versions
346
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remixml - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

2

package.json
{
"name": "remixml",
"version": "1.1.3",
"version": "1.1.4",
"description": "XML/HTML-like macro language/template engine",

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

@@ -195,2 +195,26 @@ // RemixML v1.0: XML/HTML-like macro language

function trim(s) {
var n = s.firstChild, i;
if (n)
do {
i = n.nextChild;
if (n.nodeType == 8) // Strip comment nodes
s.removeChild(n);
else
trim(n);
} while (n = i);
else
s.nodeValue = s.nodeValue.replace(/\s\s+/g,' ');
}
function btrim(e) {
var k;
e.normalize(); trim(e);
if ((k = e.firstChild) && k.nodeType == 3)
k.nodeValue = k.nodeValue.trimStart();
if ((k = e.lastChild) && k.nodeType == 3)
k.nodeValue = k.nodeValue.trimEnd();
return e;
}
function parse(tpl, $) {

@@ -275,6 +299,8 @@ function eparse(n) {

}
if (j = pregx())
k = dfnone(k).match(j);
if ((j = gatt("split")) != null)
k = dfnone(k).split(j);
{ let s = gatt("split");
if (j = pregx())
k = dfnone(k), k = s != null ? k.split(j) : k.match(j);
else if (s != null)
k = dfnone(k).split(s);
}
if ((j = gatt("join")) != null)

@@ -290,10 +316,15 @@ k = k.join(j);

continue;
case "MAKETAG":
e = eparse(k = n); replelm(n = newel(gattr(k, "name")), k);
while((j = e.firstElementChild) && j.tagName == "ATTRIB") {
n.setAttribute(gattr(j, "name"), j.innerHTML);
e.removeChild(j);
}
n.appendChild(e);
case "ELIF":
if ($._._ok)
continue;
case "IF":
e = pexpr(); $._._ok = e && e($);
case "THEN":
if (!$._._ok || repltag(eparse(n)))
continue;
break;
case "ELSE":
if ($._._ok || repltag(eparse(n)))
continue;
break;
case "FOR": {

@@ -347,2 +378,6 @@ let i = 0, res = D.createDocumentFragment(),

}
case "DELIMITER":
if ($._._recno < 2 || repltag(eparse(n)))
continue;
break;
case "INSERT":

@@ -370,2 +405,14 @@ if (e = gatt("var")) {

break;
case "TRIM":
if (repltag(btrim(eparse(n))))
continue;
break;
case "MAKETAG":
e = eparse(k = n); replelm(n = newel(gattr(k, "name")), k);
while((j = e.firstElementChild) && j.tagName == "ATTRIB") {
n.setAttribute(gattr(j, "name"), j.innerHTML);
e.removeChild(j);
}
n.appendChild(e);
break;
case "EVAL":

@@ -376,19 +423,6 @@ (e = eparse(n)).normalize();

break;
case "DELIMITER":
if ($._._recno < 2 || repltag(eparse(n)))
continue;
break;
case "ELIF":
if ($._._ok)
continue;
case "IF":
e = pexpr(); $._._ok = e && e($);
case "THEN":
if (!$._._ok || repltag(eparse(n)))
continue;
break;
case "ELSE":
if ($._._ok || repltag(eparse(n)))
continue;
break;
case "NOOUTPUT":
eparse(n);
case "COMMENT":
continue;
default:

@@ -447,2 +481,9 @@ if (n.firstChild) // Avoid unnecessary recursion

if (!String.prototype.trimStart) {
String.prototype.trimStart = function () {
return this.replace(/^\s+/, '');
};
String.prototype.trimEnd = function () { return this.replace(/\s+$/, ''); };
}
var fcache = {}, rcache = {},

@@ -455,6 +496,4 @@ Remixml = {

},
"txtparse": function(tpl, $) {
return dfnone(Remixml.parse(tpl, $));
},
"pickparse": function(tpl, $) {
"parse2txt": function(tpl, $) { return dfnone(Remixml.parse(tpl, $)); },
"parse_tagged": function(tpl, $) {
var i, j = (tpl = txt2node(tpl)).querySelectorAll("remixml");

@@ -466,5 +505,5 @@ $ = initctx($);

},
"pageparse": function($) {
return parse(D.head.parentNode, $);
}
"parse_document": function($) { return parse(D.head.parentNode, $); },
"dom2txt": function(tpl) { return dfnone(tpl); },
"trim": function(tpl) { return btrim(txt2node(tpl)); }
};

@@ -474,3 +513,3 @@

if (W.define && define.amd)
define(Remixml);
define(function() { return Remixml;} );
if (W.exports)

@@ -477,0 +516,0 @@ W.exports.Remixml = Remixml, W.exports.document = D;

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