So here is what I learned after digging and digging 🥲
const checksumNumber = checksums.crc32(content);
const buffer = Buffer.alloc(4);
buffer.writeUInt32BE(checksumNumber, 0);
const checksum = buffer.toString("base64");
You can find a complete example here: https://github.com/kasir-barati/bugs/blob/6a415e849b088d8bc82d5c8eadd532c242a530fc/generate-checksum.ts#L12-L32
NOTE: even though the repo's name might be misleading in this specific case since I have tested it and if you also clone the repo and try to run it you'll see it will log the same thing.
These two helped me a lot in forging this solution.