src/app/services/file-sharing/xml-postprocessor.ts
Function cleanXML
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function cleanXML(xml) {
const isInt = /^-?\s*\d+$/,
isDig = /^(-?\s*\d+\.?\d*)$/,
radix = 10;
Avoid deeply nested control flow statements. Open
Open
for (i = 0, s = -1, e = -1; i < l && e - s <= 15; ++i) {
if (value.charAt(i) > 0) {
if (s === -1) {
s = i;
} else {
Avoid deeply nested control flow statements. Open
Open
if (e - s <= 15) {
xml[node] = parseFloat(value);
}