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.5.1 to 0.5.2

cruftless.d.ts

4

CHANGES.md
# Changes
## 0.5.0
## 0.5.2
- Add rudimentary XInclude support.
- Add type definitions.

@@ -7,0 +7,0 @@ ## 0.4.4

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

if (node.namespaceURI === xincludeNS && node.localName === 'include' && (resolve != null)) {
href = node.getAttribute('href');
href = node.getAttributeNS(xincludeNS, 'href');
if (href != null) {

@@ -38,0 +38,0 @@ [xml, next] = resolve(href);

{
"name": "cruftless",
"version": "0.5.1",
"version": "0.5.2",
"description": "Yet another simple way to parse and generate XML",
"main": "lib/cruftless.js",
"types": "./cruftless.d.ts",
"files": [
"lib/"
"lib/",
"cruftless.d.ts"
],

@@ -9,0 +11,0 @@ "scripts": {

@@ -354,7 +354,3 @@ ```javascript --hide

resolve = (href) => {
if (href === "bla.xml") {
return ["<bla/>", resolve];
} else {
return ["<missing/>", resolve];
}
return ["<bla/>", resolve];
};

@@ -361,0 +357,0 @@ template = parse(

@@ -446,7 +446,3 @@ <!--

resolve = (href) => {
if (href === "bla.xml") {
return ["<bla/>", resolve];
} else {
return ["<missing/>", resolve];
}
return ["<bla/>", resolve];
};

@@ -463,13 +459,3 @@ template = parse(

Note that the resolve function is expected to resolve the href within a context
and then return both the XML _and_ a new resolve function that is capable fo
resolving hrefs from within the context of the resolved file. In this case,
we're not really doing that. In fact, this resolver will **always** return the
same snippet of XML, but it doesn't require a lot of imagination to figure out
how to turn this resolver into something sensible.
If you are not passing the resolve function, then it will simply leave the
xinclude unharmed.
----
Markdown generated from [./README.js.md](./README.js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd)
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