Socket
Socket
Sign inDemoInstall

nise

Package Overview
Dependencies
Maintainers
4
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nise - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

27

lib/fake-xhr/index.js

@@ -345,8 +345,23 @@ "use strict";

var parser = new DOMParser();
var parsererrors = parser
.parseFromString("INVALID", "text/xml")
.getElementsByTagName("parsererror");
var parsererrorNS = parsererrors.length
? parsererrors[0].namespaceURI : "";
var result = parser.parseFromString(text, "text/xml");
var parsererrorNS = "";
try {
var parsererrors = parser
.parseFromString("INVALID", "text/xml")
.getElementsByTagName("parsererror");
if (parsererrors.length) {
parsererrorNS = parsererrors[0].namespaceURI;
}
} catch (e) {
// passing invalid XML makes IE11 throw
// so no namespace needs to be determined
}
var result;
try {
result = parser.parseFromString(text, "text/xml");
} catch (err) {
return null;
}
return result.getElementsByTagNameNS(parsererrorNS, "parsererror").length

@@ -353,0 +368,0 @@ ? null : result;

{
"name": "nise",
"version": "1.4.1",
"version": "1.4.2",
"description": "Fake XHR and server",

@@ -53,3 +53,3 @@ "keywords": [

"mocha": "^5.0.0",
"nyc": "^11.4.1",
"nyc": "^13.0.0",
"proxyquire": "^1.8.0",

@@ -56,0 +56,0 @@ "sinon": "^4.2.2"

Sorry, the diff of this file is too big to display

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