sonyflake icon indicating copy to clipboard operation
sonyflake copied to clipboard

how to gen id within range of int53?

Open shellohunter opened this issue 8 months ago • 1 comments

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?

shellohunter avatar Jun 24 '24 11:06 shellohunter