PageSourceSearch

https://fenase.github.io/chunk-X3KPYB2G.js

js fenase.github.io collected 2026-10-03 09:11:58 UTC 2,408 bytes, 1 lines download raw bytes

1import"./chunk-2R6CW7ES.js";var o={"Using the SnowflakeIDGenerator class":{Instantiate:"Instantiate class <code>SnowflakeIDGenerator</code>","where machineId is":"where <code>machineId</code> is the number / identifier of the system currently trying to get an id","Starting on version 1.1.2023":"Starting on version 1.1.2023 you can instruct the generator to use a custom date as epoch from which the timestamps are derived for the current date.","Using the generator object":"Using the generator object, there are 3 ways of obtaining the code:","Call GetSnowflake":"Call <code>generator.GetSnowflake()</code> to get a <code>Snowflake</code> object","Call GetCode":"Call <code>generator.GetCode()</code> to get an Id in number (ulong) format","Call GetCodeString":"Call <code>generator.GetCodeString()</code> to get an Id in string format"},"Using the SnowflakeIDGenerator class as static":{"If you only need":"If you only need to get a single Id, it's easier to just use the generator class as static.","The method names":"The method names are the same as when using the generator, except they need the <code>machineId</code> as parameter:","Call GetSnowflake":"Call <code>SnowflakeIDGenerator.GetSnowflake(machineId)</code> to get a <code>Snowflake</code> object","Call GetCode":"Call <code>SnowflakeIDGenerator.GetCode(machineId)</code> to get an Id in number (ulong) format","Call GetCodeString":"Call <code>SnowflakeIDGenerator.GetCodeString(machineId)</code> to get an Id in string format"},"Using a non-standard date as epoch":{"version 1.1.2023 and up":"version 1.1.2023 and up","The first component of":"The first component of the codes is the amount of milliseconds elapsed since a set point in time, called epoch. By default, the generator uses the unix epoch (jan-1-1970 12:00:00am) as starting point to count.","Adding a DateTime":"Adding a <code>DateTime</code> object as an extra parameter when using the generator allows to change the zero value to be used to count milliseconds to."},"note recommend to use strings":"If the generated code is going to be used somewhere without a well-defined <code>ulong</code> type (example, Typescript), it is recommended to use the <code>string</code> representation, because those languages usually represent numbers as floating-point numbers and must round the code since they can't represent every integer beyond certain value."};export{o as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.