Skip to content

Commit

Permalink
Modified muteNodeNS function name to mutateNodeNS
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienCastex committed May 16, 2017
1 parent f540987 commit 54b3bf6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/helper/XML.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function seekForNS(node, parentNS) {
}
return ns;
}
function muteNodeNS(node, parentNS) {
function mutateNodeNS(node, parentNS) {
if (parentNS === void 0) { parentNS = { _default: 'DAV' }; }
var nss = seekForNS(node, parentNS);
if (node.name) {
Expand All @@ -43,7 +43,7 @@ function muteNodeNS(node, parentNS) {
return elements;
};
if (node.elements)
node.elements.forEach(function (n) { return muteNodeNS(n, nss); });
node.elements.forEach(function (n) { return mutateNodeNS(n, nss); });
else
node.elements = [];
}
Expand All @@ -54,7 +54,7 @@ var XML = (function () {
var x = xmljs.xml2js(xml, {
compact: false
});
muteNodeNS(x);
mutateNodeNS(x);
return x;
};
XML.toXML = function (xml, includeDeclaration) {
Expand Down
6 changes: 3 additions & 3 deletions src/helper/XML.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function seekForNS(node : any, parentNS : any) : any
return ns;
}

function muteNodeNS(node : any, parentNS = { _default: 'DAV' })
function mutateNodeNS(node : any, parentNS = { _default: 'DAV' })
{
var nss = seekForNS(node, parentNS);

Expand Down Expand Up @@ -57,7 +57,7 @@ function muteNodeNS(node : any, parentNS = { _default: 'DAV' })
}

if(node.elements)
node.elements.forEach(n => muteNodeNS(n, nss))
node.elements.forEach(n => mutateNodeNS(n, nss))
else
node.elements = [];
}
Expand All @@ -81,7 +81,7 @@ export abstract class XML
compact: false
});

muteNodeNS(x);
mutateNodeNS(x);
return x as XMLElement;
}

Expand Down

0 comments on commit 54b3bf6

Please sign in to comment.