function doubleToLongBits(number) {
  const buffer = new ArrayBuffer(8); // 8 bytes for float64
  const dataView = new DataView(buffer);
  dataView.setFloat64(0, number); // set as float64
  return dataView.getBigInt64(0); // read as long int (BigInt)
}
Calculates hash code that maps a key (value) to an integer (unbounded).
It uses a 20 bit offset to avoid Unicode value overlaps
@param {any} key to be converted to a positive integer
@returns {BigInt} returns big integer (unbounded) that maps to the key