UNPKG

@nosana/kit

Version:

Nosana KIT

15 lines 492 B
/** * Helper function to convert bigint values to numbers in an object * @param obj Object that may contain bigint values * @returns Object with all bigint values converted to numbers */ export function convertBigIntToNumber(obj) { const result = { ...obj }; for (const [key, value] of Object.entries(result)) { if (typeof value === 'bigint') { result[key] = Number(value); } } return result; } //# sourceMappingURL=convertBigIntToNumber.js.map