[UUID] - 固有の識別

2020年1月2日

UUID、汎用一意識別子、汎用一意識別子。

 

UUIDの生成方法の//定義
CONST getUuid =()=> { CONST S = [] // 進数の文字列を定義 CONST = hexdigits '0123456789ABCDEF' のための(; I <36; I ++ I = 0せを) { // 0x10の進数が小数16に変換され、 S [I] = hexDigits.substr(Math.floor(Math.random()* 0×10),. 1 } // time_hi_and_versionのビット12~15 0010フィールドに S [14] =」4' // ビット01にclock_seq_hi_and_reservedの6-7 // 0x3の3に、0x8というである。8 S [19] = hexDigits.substr((S [19] &&を0x3)|| 0x8という,. 1 [S。8] = S [13は] = S [18である] = S = 23である] ' - ' UUID CONST S.join =( '' の戻りUUID } エクスポートデフォルト getUuidが

//使用直接呼び出さ
getUuid()
 

おすすめ

転載: www.cnblogs.com/fengwenya/p/12141917.html