Skip to content
Snippets Groups Projects
Commit b508da5c authored by yakomaxa's avatar yakomaxa
Browse files

cleaning by lint

parent 9b9cfe41
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ function listOrRangeMap(x: string) {
pSplit.forEach(x => {
if (x.includes('-')) {
const [min, max] = x.split('-').map(x=>parseInt(x));
for (var i = min; i <= max; i++){
for (let i = min; i <= max; i++) {
res.push(i);
}
} else {
......@@ -34,11 +34,11 @@ function listOrRangeMap(x: string) {
});
return res;
} else if (x.includes('-') && !x.includes('+')) {
return rangeMap(x)
return rangeMap(x);
} else if (!x.includes('-') && x.includes('+')) {
return listMap(x).map(x => parseInt(x))
return listMap(x).map(x => parseInt(x));
} else {
return listMap(x).map(x => parseInt(x))
return listMap(x).map(x => parseInt(x));
}
}
......
......@@ -128,7 +128,8 @@ const lang = P.MonadicParser.createLanguage({
propertiesDict.resi.skip(ket),
).map(x => {
return { resi: x[0] }
;})
;
})
)
)),
// lys:a.ca lys:a lys lys.ca
......@@ -162,7 +163,7 @@ const lang = P.MonadicParser.createLanguage({
)
)
)
);
},
......
......@@ -21,12 +21,12 @@ function rangeMap(x: string) {
function listOrRangeMap(x: string) {
if (x.includes('-') && x.includes(',')) {
const pSplit = x.split(',').map(x => x.replace(/^["']|["']$/g, ''));
console.log(pSplit)
console.log(pSplit);
const res: number[] = [];
pSplit.forEach(x => {
if (x.includes('-')) {
const [min, max] = x.split('-').map(x=>parseInt(x));
for (var i = min; i <= max; i++){
for (let i = min; i <= max; i++) {
res.push(i);
}
} else {
......@@ -35,7 +35,7 @@ function listOrRangeMap(x: string) {
});
return res;
} else if (x.includes('-') && !x.includes(',')) {
return rangeMap(x)
return rangeMap(x);
} else if (!x.includes('-') && x.includes(',')) {
return listMap(x).map(x => parseInt(x));
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment