UNPKG

file-box

Version:

Pack a File into Box for easy move/transfer between servers no matter of where it is.(local path, remote url, or cloud storage)

17 lines (14 loc) 315 B
/** * Convert UUID to BigInt * @param uuid * @returns BigInt */ function uuidToBigInt (uuid: string): BigInt { // credit: https://stackoverflow.com/a/58014300/1123955 const hexBytes = `0x${uuid.replace(/-/g, '')}` const bigInteger = BigInt(hexBytes) return bigInteger } export { uuidToBigInt, }