Skip to content

Commit ada3e72

Browse files
Making eslint happy.
1 parent 6c771c3 commit ada3e72

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ module.exports = {
193193
'prefer-template': 'off',
194194
'quote-props': 'off',
195195
quotes: 'off',
196-
radix: 'error',
196+
radix: 'off',
197197
'require-atomic-updates': 'error',
198198
'require-await': 'warn',
199199
'require-jsdoc': 'off',

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export { XPath } from './xpath';
22
export { Xslt, XsltOptions } from './xslt';
3-
export { xmlParse, xmlEscapeText } from './dom';
3+
export { XmlParser, xmlEscapeText } from './dom';
44
export { ExprContext } from './xpath';

src/xpath/expressions/binary-expr.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export class BinaryExpr extends Expression {
108108

109109
ret = false;
110110
for (let i = 0; i < n.length; ++i) {
111-
let nn = xmlValue(n[i]) - 0;
111+
let nn = parseInt(xmlValue(n[i])) - 0;
112112
if (cmp(s, nn)) {
113113
ret = true;
114114
break;
@@ -120,7 +120,7 @@ export class BinaryExpr extends Expression {
120120

121121
ret = false;
122122
for (let i = 0; i < n.length; ++i) {
123-
let nn = xmlValue(n[i]) - 0;
123+
let nn = parseInt(xmlValue(n[i])) - 0;
124124
if (cmp(nn, s)) {
125125
ret = true;
126126
break;

src/xpath/functions/standard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ export function sum(context: ExprContext) {
456456
const n = this.args[0].evaluate(context).nodeSetValue();
457457
let sum = 0;
458458
for (let i = 0; i < n.length; ++i) {
459-
sum += xmlValue(n[i]) - 0;
459+
sum += parseInt(xmlValue(n[i])) - 0;
460460
}
461461
return new NumberValue(sum);
462462
}

src/xpath/values/node-set-value.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class NodeSetValue implements NodeValue {
2323
}
2424

2525
numberValue() {
26-
return this.stringValue() - 0;
26+
return parseInt(this.stringValue()) - 0;
2727
}
2828

2929
nodeSetValue() {

0 commit comments

Comments
 (0)