Move canvas methods under visuals

This commit is contained in:
2023-12-20 16:22:38 +02:00
parent 78c0a67a77
commit 5fc7ce3c12
3 changed files with 629 additions and 380 deletions

View File

@ -95,6 +95,15 @@ export function filterObject(
);
}
export const maybeToNumber = (something: any): number | any => {
// If something is BigInt
if (typeof something === "bigint") {
return Number(something);
} else {
return something;
}
}
export const GeneratorType = (function*(){yield undefined;}).constructor;
export const GeneratorIteratorType = (function*(){yield undefined;}).prototype.constructor;
export const isGenerator = (v:any) => Object.prototype.toString.call(v) === '[object Generator]';