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

cruftless

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cruftless - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

4

CHANGES.md
# Changes
## 0.4.1
- Fix a number of issues with RelaxNG generation and namespaces
## 0.4.0

@@ -4,0 +8,0 @@

3

lib/model/builder.js

@@ -57,5 +57,6 @@ // Generated by CoffeeScript 2.5.1

return binding.raw(item.value).apply(el, 'if');
} else if (item.prefix === 'xmlns') {
} else if (item.prefix === 'xmlns' || item.name === 'xmlns') {
} else {
// ignore
res = binding.curly(item.value).apply(attr(item.name));

@@ -62,0 +63,0 @@ if (item.namespaceURI) {

@@ -239,3 +239,3 @@ // Generated by CoffeeScript 2.5.1

relaxng: function(ctx) {
var multiple, ref, required, wrap;
var el, multiple, prefix, ref, required, wrap;
required = (((ref = meta.content) != null ? ref.length : void 0) || 0) === 1 ? meta.content[0].isRequired() : meta.required;

@@ -254,3 +254,3 @@ multiple = meta.multiple;

wrap = wrap || identity;
return wrap(ctx.element('element').attrs(ctx.attr('name').value(meta.name)).content(...meta.attrs.map(function(node) {
el = ctx.element('element').attrs(ctx.attr('name').value(meta.name)).content(...meta.attrs.map(function(node) {
return node.relaxng(ctx);

@@ -261,3 +261,12 @@ }), ...meta.content.map(function(node) {

return node != null;
})));
}));
if (meta.ns) {
if (meta.name.indexOf(':') >= 0) {
[prefix] = meta.name.split(':');
el.attrs(ctx.attr(`xmlns:${prefix}`).value(meta.ns));
} else {
el.attrs(ctx.attr('ns').value(meta.ns));
}
}
return wrap(el);
}

@@ -264,0 +273,0 @@ };

{
"name": "cruftless",
"version": "0.4.0",
"version": "0.4.1",
"description": "Yet another simple way to parse and generate XML",

@@ -5,0 +5,0 @@ "main": "lib/cruftless.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