sonyflake
sonyflake copied to clipboard
how to gen id within range of int53?
I'm having a trouble integrating sonyflake into my project. sonyflake only generates int64. unfortunately int64 is not officially supported by javascript or lua. there will be a precision lost. If I can restrict the output in the range of int53 (with the trailing 11 bits set to 0), then everything will be just fine.
I know there are some configs like BitLenSequence
, BitLenTime
, but I'm unable to alter them since they are defined as constants.
Is there anyway out?