Problem description
isEmpty() throws a Cannot convert a BigInt value to a number.
Related code
|
isEmpty<T>(value: T): boolean { |
|
return value === undefined || value === null || (isNaN(value as any) && typeof value !== "string"); |
|
} |
Solution
Using isNaN(Number(value)) fixes the issue.
Discussion
Looking at the other isNaN() calls in said file it looks like some places are using Number(value) while some others don't.
I suspect some other methods would throw in the same way.
Problem description
isEmpty()throws aCannot convert a BigInt value to a number.Related code
danfojs/src/danfojs-base/shared/utils.ts
Lines 93 to 95 in f272a7e
Solution
Using
isNaN(Number(value))fixes the issue.Discussion
Looking at the other
isNaN()calls in said file it looks like some places are usingNumber(value)while some others don't.I suspect some other methods would throw in the same way.