aboutsummaryrefslogtreecommitdiff
path: root/lib/xml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xml')
-rw-r--r--lib/xml/nodes.js4
-rw-r--r--lib/xml/reader.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/xml/nodes.js b/lib/xml/nodes.js
index 9305918..76f5fd7 100644
--- a/lib/xml/nodes.js
+++ b/lib/xml/nodes.js
@@ -32,7 +32,7 @@ function Element(name, attributes, children) {
Element.prototype.first = function(name) {
return _.find(this.children, function(child) {
- return child.name == name;
+ return child.name === name;
});
};
@@ -42,7 +42,7 @@ Element.prototype.firstOrEmpty = function(name) {
Element.prototype.getElementsByTagName = function(name) {
var elements = _.filter(this.children, function(child) {
- return child.name == name;
+ return child.name === name;
});
return toElementList(elements);
};
diff --git a/lib/xml/reader.js b/lib/xml/reader.js
index 67b69be..844ee0c 100644
--- a/lib/xml/reader.js
+++ b/lib/xml/reader.js
@@ -78,8 +78,8 @@ function readString(xmlString, namespaceMap) {
function mapObject(input, valueFunc, keyFunc) {
return _.reduce(input, function(result, value, key) {
- var mappedKey = keyFunc.call(null, value, key, input);
- result[mappedKey] = valueFunc.call(null, value, key, input);
+ var mappedKey = keyFunc(value, key, input);
+ result[mappedKey] = valueFunc(value, key, input);
return result;
}, {});
}