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

lassy-xpath

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lassy-xpath - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

2

package.json
{
"name": "lassy-xpath",
"version": "0.3.3",
"version": "0.3.4",
"description": "XPath format and editor for searching LASSY XML files",

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

@@ -55,8 +55,2 @@ "use strict";

}
if (match[1] == '/' || match[1] == ':') {
// don't indent nodes with a preceding axis, done without
// lookbehind to support more browsers
var end = match.index + match[0].length;
return xpath.substring(0, end) + this.format(xpath.substring(end), indentSize, indentCount);
}
var index = match.index + match[1].length;

@@ -73,2 +67,8 @@ var preceding = xpath.substring(0, index);

}
if (match[1] == '/' || match[1] == ':') {
// don't indent nodes with a preceding axis, done without
// lookbehind to support more browsers
var end = match.index + match[0].length;
return xpath.substring(0, end) + this.format(xpath.substring(end), indentSize, indentCount);
}
var tail = xpath.substring(index + 4);

@@ -75,0 +75,0 @@ return preceding.replace(/ +$/, '') + "\n" + ' '.repeat(indentCount * indentSize) + "node" + this.format(tail, indentSize, indentCount);

@@ -46,2 +46,4 @@ "use strict";

expect(parserService.format('//node[@foo and node[@bar or @id="42"]]')).toEqual("//node[@foo and\n node[@bar or @id=\"42\"]]");
expect(parserService.format("//node[@cat=\"top\" and node[@rel=\"--\" and @cat=\"smain\" and node[@pt=\"vnw\" and @rel=\"su\" and number(@begin) < ../node[@pt=\"ww\" and @rel=\"hd\"]/number(@begin)] and node[@pt=\"ww\" and @rel=\"hd\" and number(@begin) < ../node[@rel=\"predc\" and @cat=\"np\"]/node[@rel=\"det\" and @pt=\"lid\"]/number(@begin)] and node[@rel=\"predc\" and @cat=\"np\" and node[@rel=\"det\" and @pt=\"lid\" and number(@begin) < ../node[@rel=\"hd\" and @pt=\"n\"]/number(@begin)] and node[@rel=\"hd\" and @pt=\"n\" and number(@begin) < ../../../node[@rel=\"--\" and @pt=\"let\"]/number(@begin)]]] and node[@rel=\"--\" and @pt=\"let\"]]"))
.toEqual("//node[@cat=\"top\" and\n node[@rel=\"--\" and @cat=\"smain\" and\n node[@pt=\"vnw\" and @rel=\"su\" and number(@begin) < ../node[@pt=\"ww\" and @rel=\"hd\"]/number(@begin)] and\n node[@pt=\"ww\" and @rel=\"hd\" and number(@begin) < ../node[@rel=\"predc\" and @cat=\"np\"]/node[@rel=\"det\" and @pt=\"lid\"]/number(@begin)] and\n node[@rel=\"predc\" and @cat=\"np\" and\n node[@rel=\"det\" and @pt=\"lid\" and number(@begin) < ../node[@rel=\"hd\" and @pt=\"n\"]/number(@begin)] and\n node[@rel=\"hd\" and @pt=\"n\" and number(@begin) < ../../../node[@rel=\"--\" and @pt=\"let\"]/number(@begin)]]] and\n node[@rel=\"--\" and @pt=\"let\"]]");
});

@@ -48,0 +50,0 @@ function expectWarnings(xpath, expectedWarnings) {

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