X7ROOT File Manager
Current Path:
/lib/node_modules/npm/node_modules/uuid/lib
lib
/
node_modules
/
npm
/
node_modules
/
uuid
/
lib
/
ðŸ“
..
📄
bytesToUuid.js
(747 B)
📄
md5-browser.js
(6.66 KB)
📄
md5.js
(576 B)
📄
rng-browser.js
(1.28 KB)
📄
rng.js
(246 B)
📄
sha1-browser.js
(2.28 KB)
📄
sha1.js
(579 B)
📄
v35.js
(1.58 KB)
Editing: bytesToUuid.js
/** * Convert array of 16 byte values to UUID string format of the form: * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */ var byteToHex = []; for (var i = 0; i < 256; ++i) { byteToHex[i] = (i + 0x100).toString(16).substr(1); } function bytesToUuid(buf, offset) { var i = offset || 0; var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 return ([bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]]).join(''); } module.exports = bytesToUuid;
Upload File
Create Folder