chore(eslint): fix isNumeric types
This commit is contained in:
parent
95b9e47993
commit
beafa21796
1 changed files with 3 additions and 2 deletions
|
@ -125,8 +125,9 @@ export function on(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isNumeric(n: string) {
|
export function isNumeric(s: string) {
|
||||||
return !isNaN(parseFloat(n)) && isFinite(n as any as number);
|
const n = parseFloat(s);
|
||||||
|
return !isNaN(n) && isFinite(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
function offset(element: HTMLElement) {
|
function offset(element: HTMLElement) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue