Socket
Socket
Sign inDemoInstall

xml-parser

Package Overview
Dependencies
1
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.1.0

2

index.js

@@ -128,3 +128,3 @@

debug('attribute %j', xml);
var m = match(/([\w:]+)\s*=\s*("[^"]*"|'[^']*'|\w+)\s*/);
var m = match(/([\w:-]+)\s*=\s*("[^"]*"|'[^']*'|\w+)\s*/);
if (!m) return;

@@ -131,0 +131,0 @@ return { name: m[1], value: strip(m[2]) }

{
"name": "xml-parser",
"version": "1.0.0",
"version": "1.1.0",
"repository": "segmentio/xml-parser",

@@ -5,0 +5,0 @@ "description": "the little xml parser that could",

var parse = require('..');
var should = require('should');

@@ -190,1 +191,13 @@ it('should support blank strings', function(){

})
it('should support attributes with a hyphen', function () {
var node = parse('<a data-bar="baz">foo</a>')
node.root.should.eql({
name: "a",
attributes: {
"data-bar": "baz"
},
children: [],
content: "foo"
})
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc