Socket
Socket
Sign inDemoInstall

uuid

Package Overview
Dependencies
0
Maintainers
4
Versions
37
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.0.1 to 7.0.2-beta.0

6

dist/esm-browser/rng.js

@@ -6,3 +6,5 @@ // Unique ID creation requires a high quality random # generator. In the browser we therefore

// find the complete implementation of crypto (msCrypto) on IE11.
var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto);
// Use self in order to support WebWorkers as well, see
// https://developer.mozilla.org/en-US/docs/Web/API/Window/self
var getRandomValues = typeof self !== 'undefined' && (typeof self.crypto !== 'undefined' && self.crypto.getRandomValues && self.crypto.getRandomValues.bind(self.crypto) || typeof self.msCrypto !== 'undefined' && self.msCrypto.getRandomValues && self.msCrypto.getRandomValues.bind(self.msCrypto));
var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef

@@ -12,3 +14,3 @@

if (!getRandomValues) {
throw new Error('uuid: This browser does not seem to support crypto.getRandomValues(). If you need to support this browser, please provide a custom random number generator through options.rng.');
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
}

@@ -15,0 +17,0 @@

@@ -12,3 +12,5 @@ "use strict";

// find the complete implementation of crypto (msCrypto) on IE11.
var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto);
// Use self in order to support WebWorkers as well, see
// https://developer.mozilla.org/en-US/docs/Web/API/Window/self
var getRandomValues = typeof self !== 'undefined' && (typeof self.crypto !== 'undefined' && self.crypto.getRandomValues && self.crypto.getRandomValues.bind(self.crypto) || typeof self.msCrypto !== 'undefined' && self.msCrypto.getRandomValues && self.msCrypto.getRandomValues.bind(self.msCrypto));
var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef

@@ -18,3 +20,3 @@

if (!getRandomValues) {
throw new Error('uuid: This browser does not seem to support crypto.getRandomValues(). If you need to support this browser, please provide a custom random number generator through options.rng.');
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
}

@@ -21,0 +23,0 @@

@@ -1,1 +0,1 @@

!function(r,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((r=r||self).uuid={})}(this,(function(r){"use strict";var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),e=new Uint8Array(16);function t(){if(!n)throw new Error("uuid: This browser does not seem to support crypto.getRandomValues(). If you need to support this browser, please provide a custom random number generator through options.rng.");return n(e)}for(var o,a,u=[],f=0;f<256;++f)u[f]=(f+256).toString(16).substr(1);function c(r,n){var e=n||0,t=u;return[t[r[e++]],t[r[e++]],t[r[e++]],t[r[e++]],"-",t[r[e++]],t[r[e++]],"-",t[r[e++]],t[r[e++]],"-",t[r[e++]],t[r[e++]],"-",t[r[e++]],t[r[e++]],t[r[e++]],t[r[e++]],t[r[e++]],t[r[e++]]].join("")}var i=0,s=0;function d(r,n,e){var t=function(r,t,o,a){var u=o&&a||0;if("string"==typeof r&&(r=function(r){r=unescape(encodeURIComponent(r));for(var n=new Array(r.length),e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n}(r)),"string"==typeof t&&(t=function(r){var n=[];return r.replace(/[a-fA-F0-9]{2}/g,(function(r){n.push(parseInt(r,16))})),n}(t)),!Array.isArray(r))throw TypeError("value must be an array of bytes");if(!Array.isArray(t)||16!==t.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var f=e(t.concat(r));if(f[6]=15&f[6]|n,f[8]=63&f[8]|128,o)for(var i=0;i<16;++i)o[u+i]=f[i];return o||c(f)};try{t.name=r}catch(r){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}function v(r,n){var e=(65535&r)+(65535&n);return(r>>16)+(n>>16)+(e>>16)<<16|65535&e}function l(r,n,e,t,o,a){return v((u=v(v(n,r),v(t,a)))<<(f=o)|u>>>32-f,e);var u,f}function p(r,n,e,t,o,a,u){return l(n&e|~n&t,r,n,o,a,u)}function y(r,n,e,t,o,a,u){return l(n&t|e&~t,r,n,o,a,u)}function h(r,n,e,t,o,a,u){return l(n^e^t,r,n,o,a,u)}function g(r,n,e,t,o,a,u){return l(e^(n|~t),r,n,o,a,u)}var m=d("v3",48,(function(r){if("string"==typeof r){var n=unescape(encodeURIComponent(r));r=new Array(n.length);for(var e=0;e<n.length;e++)r[e]=n.charCodeAt(e)}return function(r){var n,e,t,o=[],a=32*r.length;for(n=0;n<a;n+=8)e=r[n>>5]>>>n%32&255,t=parseInt("0123456789abcdef".charAt(e>>>4&15)+"0123456789abcdef".charAt(15&e),16),o.push(t);return o}(function(r,n){var e,t,o,a,u;r[n>>5]|=128<<n%32,r[14+(n+64>>>9<<4)]=n;var f=1732584193,c=-271733879,i=-1732584194,s=271733878;for(e=0;e<r.length;e+=16)t=f,o=c,a=i,u=s,f=p(f,c,i,s,r[e],7,-680876936),s=p(s,f,c,i,r[e+1],12,-389564586),i=p(i,s,f,c,r[e+2],17,606105819),c=p(c,i,s,f,r[e+3],22,-1044525330),f=p(f,c,i,s,r[e+4],7,-176418897),s=p(s,f,c,i,r[e+5],12,1200080426),i=p(i,s,f,c,r[e+6],17,-1473231341),c=p(c,i,s,f,r[e+7],22,-45705983),f=p(f,c,i,s,r[e+8],7,1770035416),s=p(s,f,c,i,r[e+9],12,-1958414417),i=p(i,s,f,c,r[e+10],17,-42063),c=p(c,i,s,f,r[e+11],22,-1990404162),f=p(f,c,i,s,r[e+12],7,1804603682),s=p(s,f,c,i,r[e+13],12,-40341101),i=p(i,s,f,c,r[e+14],17,-1502002290),c=p(c,i,s,f,r[e+15],22,1236535329),f=y(f,c,i,s,r[e+1],5,-165796510),s=y(s,f,c,i,r[e+6],9,-1069501632),i=y(i,s,f,c,r[e+11],14,643717713),c=y(c,i,s,f,r[e],20,-373897302),f=y(f,c,i,s,r[e+5],5,-701558691),s=y(s,f,c,i,r[e+10],9,38016083),i=y(i,s,f,c,r[e+15],14,-660478335),c=y(c,i,s,f,r[e+4],20,-405537848),f=y(f,c,i,s,r[e+9],5,568446438),s=y(s,f,c,i,r[e+14],9,-1019803690),i=y(i,s,f,c,r[e+3],14,-187363961),c=y(c,i,s,f,r[e+8],20,1163531501),f=y(f,c,i,s,r[e+13],5,-1444681467),s=y(s,f,c,i,r[e+2],9,-51403784),i=y(i,s,f,c,r[e+7],14,1735328473),c=y(c,i,s,f,r[e+12],20,-1926607734),f=h(f,c,i,s,r[e+5],4,-378558),s=h(s,f,c,i,r[e+8],11,-2022574463),i=h(i,s,f,c,r[e+11],16,1839030562),c=h(c,i,s,f,r[e+14],23,-35309556),f=h(f,c,i,s,r[e+1],4,-1530992060),s=h(s,f,c,i,r[e+4],11,1272893353),i=h(i,s,f,c,r[e+7],16,-155497632),c=h(c,i,s,f,r[e+10],23,-1094730640),f=h(f,c,i,s,r[e+13],4,681279174),s=h(s,f,c,i,r[e],11,-358537222),i=h(i,s,f,c,r[e+3],16,-722521979),c=h(c,i,s,f,r[e+6],23,76029189),f=h(f,c,i,s,r[e+9],4,-640364487),s=h(s,f,c,i,r[e+12],11,-421815835),i=h(i,s,f,c,r[e+15],16,530742520),c=h(c,i,s,f,r[e+2],23,-995338651),f=g(f,c,i,s,r[e],6,-198630844),s=g(s,f,c,i,r[e+7],10,1126891415),i=g(i,s,f,c,r[e+14],15,-1416354905),c=g(c,i,s,f,r[e+5],21,-57434055),f=g(f,c,i,s,r[e+12],6,1700485571),s=g(s,f,c,i,r[e+3],10,-1894986606),i=g(i,s,f,c,r[e+10],15,-1051523),c=g(c,i,s,f,r[e+1],21,-2054922799),f=g(f,c,i,s,r[e+8],6,1873313359),s=g(s,f,c,i,r[e+15],10,-30611744),i=g(i,s,f,c,r[e+6],15,-1560198380),c=g(c,i,s,f,r[e+13],21,1309151649),f=g(f,c,i,s,r[e+4],6,-145523070),s=g(s,f,c,i,r[e+11],10,-1120210379),i=g(i,s,f,c,r[e+2],15,718787259),c=g(c,i,s,f,r[e+9],21,-343485551),f=v(f,t),c=v(c,o),i=v(i,a),s=v(s,u);return[f,c,i,s]}(function(r){var n,e=[];for(e[(r.length>>2)-1]=void 0,n=0;n<e.length;n+=1)e[n]=0;var t=8*r.length;for(n=0;n<t;n+=8)e[n>>5]|=(255&r[n/8])<<n%32;return e}(r),8*r.length))}));function b(r,n,e,t){switch(r){case 0:return n&e^~n&t;case 1:return n^e^t;case 2:return n&e^n&t^e&t;case 3:return n^e^t}}function w(r,n){return r<<n|r>>>32-n}var A=d("v5",80,(function(r){var n=[1518500249,1859775393,2400959708,3395469782],e=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var t=unescape(encodeURIComponent(r));r=new Array(t.length);for(var o=0;o<t.length;o++)r[o]=t.charCodeAt(o)}r.push(128);var a=r.length/4+2,u=Math.ceil(a/16),f=new Array(u);for(o=0;o<u;o++){f[o]=new Array(16);for(var c=0;c<16;c++)f[o][c]=r[64*o+4*c]<<24|r[64*o+4*c+1]<<16|r[64*o+4*c+2]<<8|r[64*o+4*c+3]}for(f[u-1][14]=8*(r.length-1)/Math.pow(2,32),f[u-1][14]=Math.floor(f[u-1][14]),f[u-1][15]=8*(r.length-1)&4294967295,o=0;o<u;o++){for(var i=new Array(80),s=0;s<16;s++)i[s]=f[o][s];for(s=16;s<80;s++)i[s]=w(i[s-3]^i[s-8]^i[s-14]^i[s-16],1);var d=e[0],v=e[1],l=e[2],p=e[3],y=e[4];for(s=0;s<80;s++){var h=Math.floor(s/20),g=w(d,5)+b(h,v,l,p)+y+n[h]+i[s]>>>0;y=p,p=l,l=w(v,30)>>>0,v=d,d=g}e[0]=e[0]+d>>>0,e[1]=e[1]+v>>>0,e[2]=e[2]+l>>>0,e[3]=e[3]+p>>>0,e[4]=e[4]+y>>>0}return[e[0]>>24&255,e[0]>>16&255,e[0]>>8&255,255&e[0],e[1]>>24&255,e[1]>>16&255,e[1]>>8&255,255&e[1],e[2]>>24&255,e[2]>>16&255,e[2]>>8&255,255&e[2],e[3]>>24&255,e[3]>>16&255,e[3]>>8&255,255&e[3],e[4]>>24&255,e[4]>>16&255,e[4]>>8&255,255&e[4]]}));r.v1=function(r,n,e){var u=n&&e||0,f=n||[],d=(r=r||{}).node||o,v=void 0!==r.clockseq?r.clockseq:a;if(null==d||null==v){var l=r.random||(r.rng||t)();null==d&&(d=o=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==v&&(v=a=16383&(l[6]<<8|l[7]))}var p=void 0!==r.msecs?r.msecs:(new Date).getTime(),y=void 0!==r.nsecs?r.nsecs:s+1,h=p-i+(y-s)/1e4;if(h<0&&void 0===r.clockseq&&(v=v+1&16383),(h<0||p>i)&&void 0===r.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");i=p,s=y,a=v;var g=(1e4*(268435455&(p+=122192928e5))+y)%4294967296;f[u++]=g>>>24&255,f[u++]=g>>>16&255,f[u++]=g>>>8&255,f[u++]=255&g;var m=p/4294967296*1e4&268435455;f[u++]=m>>>8&255,f[u++]=255&m,f[u++]=m>>>24&15|16,f[u++]=m>>>16&255,f[u++]=v>>>8|128,f[u++]=255&v;for(var b=0;b<6;++b)f[u+b]=d[b];return n||c(f)},r.v3=m,r.v4=function(r,n,e){var o=n&&e||0;"string"==typeof r&&(n="binary"===r?new Array(16):null,r=null);var a=(r=r||{}).random||(r.rng||t)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,n)for(var u=0;u<16;++u)n[o+u]=a[u];return n||c(a)},r.v5=A,Object.defineProperty(r,"__esModule",{value:!0})}));
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((r=r||self).uuid={})}(this,(function(r){"use strict";var e="undefined"!=typeof self&&(void 0!==self.crypto&&self.crypto.getRandomValues&&self.crypto.getRandomValues.bind(self.crypto)||void 0!==self.msCrypto&&self.msCrypto.getRandomValues&&self.msCrypto.getRandomValues.bind(self.msCrypto)),n=new Uint8Array(16);function t(){if(!e)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(n)}for(var o,a,u=[],f=0;f<256;++f)u[f]=(f+256).toString(16).substr(1);function c(r,e){var n=e||0,t=u;return[t[r[n++]],t[r[n++]],t[r[n++]],t[r[n++]],"-",t[r[n++]],t[r[n++]],"-",t[r[n++]],t[r[n++]],"-",t[r[n++]],t[r[n++]],"-",t[r[n++]],t[r[n++]],t[r[n++]],t[r[n++]],t[r[n++]],t[r[n++]]].join("")}var i=0,s=0;function v(r,e,n){var t=function(r,t,o,a){var u=o&&a||0;if("string"==typeof r&&(r=function(r){r=unescape(encodeURIComponent(r));for(var e=new Array(r.length),n=0;n<r.length;n++)e[n]=r.charCodeAt(n);return e}(r)),"string"==typeof t&&(t=function(r){var e=[];return r.replace(/[a-fA-F0-9]{2}/g,(function(r){e.push(parseInt(r,16))})),e}(t)),!Array.isArray(r))throw TypeError("value must be an array of bytes");if(!Array.isArray(t)||16!==t.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var f=n(t.concat(r));if(f[6]=15&f[6]|e,f[8]=63&f[8]|128,o)for(var i=0;i<16;++i)o[u+i]=f[i];return o||c(f)};try{t.name=r}catch(r){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}function l(r,e){var n=(65535&r)+(65535&e);return(r>>16)+(e>>16)+(n>>16)<<16|65535&n}function d(r,e,n,t,o,a){return l((u=l(l(e,r),l(t,a)))<<(f=o)|u>>>32-f,n);var u,f}function p(r,e,n,t,o,a,u){return d(e&n|~e&t,r,e,o,a,u)}function y(r,e,n,t,o,a,u){return d(e&t|n&~t,r,e,o,a,u)}function h(r,e,n,t,o,a,u){return d(e^n^t,r,e,o,a,u)}function g(r,e,n,t,o,a,u){return d(n^(e|~t),r,e,o,a,u)}var m=v("v3",48,(function(r){if("string"==typeof r){var e=unescape(encodeURIComponent(r));r=new Array(e.length);for(var n=0;n<e.length;n++)r[n]=e.charCodeAt(n)}return function(r){var e,n,t,o=[],a=32*r.length;for(e=0;e<a;e+=8)n=r[e>>5]>>>e%32&255,t=parseInt("0123456789abcdef".charAt(n>>>4&15)+"0123456789abcdef".charAt(15&n),16),o.push(t);return o}(function(r,e){var n,t,o,a,u;r[e>>5]|=128<<e%32,r[14+(e+64>>>9<<4)]=e;var f=1732584193,c=-271733879,i=-1732584194,s=271733878;for(n=0;n<r.length;n+=16)t=f,o=c,a=i,u=s,f=p(f,c,i,s,r[n],7,-680876936),s=p(s,f,c,i,r[n+1],12,-389564586),i=p(i,s,f,c,r[n+2],17,606105819),c=p(c,i,s,f,r[n+3],22,-1044525330),f=p(f,c,i,s,r[n+4],7,-176418897),s=p(s,f,c,i,r[n+5],12,1200080426),i=p(i,s,f,c,r[n+6],17,-1473231341),c=p(c,i,s,f,r[n+7],22,-45705983),f=p(f,c,i,s,r[n+8],7,1770035416),s=p(s,f,c,i,r[n+9],12,-1958414417),i=p(i,s,f,c,r[n+10],17,-42063),c=p(c,i,s,f,r[n+11],22,-1990404162),f=p(f,c,i,s,r[n+12],7,1804603682),s=p(s,f,c,i,r[n+13],12,-40341101),i=p(i,s,f,c,r[n+14],17,-1502002290),c=p(c,i,s,f,r[n+15],22,1236535329),f=y(f,c,i,s,r[n+1],5,-165796510),s=y(s,f,c,i,r[n+6],9,-1069501632),i=y(i,s,f,c,r[n+11],14,643717713),c=y(c,i,s,f,r[n],20,-373897302),f=y(f,c,i,s,r[n+5],5,-701558691),s=y(s,f,c,i,r[n+10],9,38016083),i=y(i,s,f,c,r[n+15],14,-660478335),c=y(c,i,s,f,r[n+4],20,-405537848),f=y(f,c,i,s,r[n+9],5,568446438),s=y(s,f,c,i,r[n+14],9,-1019803690),i=y(i,s,f,c,r[n+3],14,-187363961),c=y(c,i,s,f,r[n+8],20,1163531501),f=y(f,c,i,s,r[n+13],5,-1444681467),s=y(s,f,c,i,r[n+2],9,-51403784),i=y(i,s,f,c,r[n+7],14,1735328473),c=y(c,i,s,f,r[n+12],20,-1926607734),f=h(f,c,i,s,r[n+5],4,-378558),s=h(s,f,c,i,r[n+8],11,-2022574463),i=h(i,s,f,c,r[n+11],16,1839030562),c=h(c,i,s,f,r[n+14],23,-35309556),f=h(f,c,i,s,r[n+1],4,-1530992060),s=h(s,f,c,i,r[n+4],11,1272893353),i=h(i,s,f,c,r[n+7],16,-155497632),c=h(c,i,s,f,r[n+10],23,-1094730640),f=h(f,c,i,s,r[n+13],4,681279174),s=h(s,f,c,i,r[n],11,-358537222),i=h(i,s,f,c,r[n+3],16,-722521979),c=h(c,i,s,f,r[n+6],23,76029189),f=h(f,c,i,s,r[n+9],4,-640364487),s=h(s,f,c,i,r[n+12],11,-421815835),i=h(i,s,f,c,r[n+15],16,530742520),c=h(c,i,s,f,r[n+2],23,-995338651),f=g(f,c,i,s,r[n],6,-198630844),s=g(s,f,c,i,r[n+7],10,1126891415),i=g(i,s,f,c,r[n+14],15,-1416354905),c=g(c,i,s,f,r[n+5],21,-57434055),f=g(f,c,i,s,r[n+12],6,1700485571),s=g(s,f,c,i,r[n+3],10,-1894986606),i=g(i,s,f,c,r[n+10],15,-1051523),c=g(c,i,s,f,r[n+1],21,-2054922799),f=g(f,c,i,s,r[n+8],6,1873313359),s=g(s,f,c,i,r[n+15],10,-30611744),i=g(i,s,f,c,r[n+6],15,-1560198380),c=g(c,i,s,f,r[n+13],21,1309151649),f=g(f,c,i,s,r[n+4],6,-145523070),s=g(s,f,c,i,r[n+11],10,-1120210379),i=g(i,s,f,c,r[n+2],15,718787259),c=g(c,i,s,f,r[n+9],21,-343485551),f=l(f,t),c=l(c,o),i=l(i,a),s=l(s,u);return[f,c,i,s]}(function(r){var e,n=[];for(n[(r.length>>2)-1]=void 0,e=0;e<n.length;e+=1)n[e]=0;var t=8*r.length;for(e=0;e<t;e+=8)n[e>>5]|=(255&r[e/8])<<e%32;return n}(r),8*r.length))}));function b(r,e,n,t){switch(r){case 0:return e&n^~e&t;case 1:return e^n^t;case 2:return e&n^e&t^n&t;case 3:return e^n^t}}function A(r,e){return r<<e|r>>>32-e}var w=v("v5",80,(function(r){var e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var t=unescape(encodeURIComponent(r));r=new Array(t.length);for(var o=0;o<t.length;o++)r[o]=t.charCodeAt(o)}r.push(128);var a=r.length/4+2,u=Math.ceil(a/16),f=new Array(u);for(o=0;o<u;o++){f[o]=new Array(16);for(var c=0;c<16;c++)f[o][c]=r[64*o+4*c]<<24|r[64*o+4*c+1]<<16|r[64*o+4*c+2]<<8|r[64*o+4*c+3]}for(f[u-1][14]=8*(r.length-1)/Math.pow(2,32),f[u-1][14]=Math.floor(f[u-1][14]),f[u-1][15]=8*(r.length-1)&4294967295,o=0;o<u;o++){for(var i=new Array(80),s=0;s<16;s++)i[s]=f[o][s];for(s=16;s<80;s++)i[s]=A(i[s-3]^i[s-8]^i[s-14]^i[s-16],1);var v=n[0],l=n[1],d=n[2],p=n[3],y=n[4];for(s=0;s<80;s++){var h=Math.floor(s/20),g=A(v,5)+b(h,l,d,p)+y+e[h]+i[s]>>>0;y=p,p=d,d=A(l,30)>>>0,l=v,v=g}n[0]=n[0]+v>>>0,n[1]=n[1]+l>>>0,n[2]=n[2]+d>>>0,n[3]=n[3]+p>>>0,n[4]=n[4]+y>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));r.v1=function(r,e,n){var u=e&&n||0,f=e||[],v=(r=r||{}).node||o,l=void 0!==r.clockseq?r.clockseq:a;if(null==v||null==l){var d=r.random||(r.rng||t)();null==v&&(v=o=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==l&&(l=a=16383&(d[6]<<8|d[7]))}var p=void 0!==r.msecs?r.msecs:(new Date).getTime(),y=void 0!==r.nsecs?r.nsecs:s+1,h=p-i+(y-s)/1e4;if(h<0&&void 0===r.clockseq&&(l=l+1&16383),(h<0||p>i)&&void 0===r.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");i=p,s=y,a=l;var g=(1e4*(268435455&(p+=122192928e5))+y)%4294967296;f[u++]=g>>>24&255,f[u++]=g>>>16&255,f[u++]=g>>>8&255,f[u++]=255&g;var m=p/4294967296*1e4&268435455;f[u++]=m>>>8&255,f[u++]=255&m,f[u++]=m>>>24&15|16,f[u++]=m>>>16&255,f[u++]=l>>>8|128,f[u++]=255&l;for(var b=0;b<6;++b)f[u+b]=v[b];return e||c(f)},r.v3=m,r.v4=function(r,e,n){var o=e&&n||0;"string"==typeof r&&(e="binary"===r?new Array(16):null,r=null);var a=(r=r||{}).random||(r.rng||t)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,e)for(var u=0;u<16;++u)e[o+u]=a[u];return e||c(a)},r.v5=w,Object.defineProperty(r,"__esModule",{value:!0})}));

@@ -1,1 +0,1 @@

!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e=e||self).uuidv1=o()}(this,(function(){"use strict";var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),o=new Uint8Array(16);function n(){if(!e)throw new Error("uuid: This browser does not seem to support crypto.getRandomValues(). If you need to support this browser, please provide a custom random number generator through options.rng.");return e(o)}for(var r,t,s=[],u=0;u<256;++u)s[u]=(u+256).toString(16).substr(1);var i=0,d=0;return function(e,o,u){var a=o&&u||0,c=o||[],f=(e=e||{}).node||r,p=void 0!==e.clockseq?e.clockseq:t;if(null==f||null==p){var m=e.random||(e.rng||n)();null==f&&(f=r=[1|m[0],m[1],m[2],m[3],m[4],m[5]]),null==p&&(p=t=16383&(m[6]<<8|m[7]))}var l=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:d+1,y=l-i+(v-d)/1e4;if(y<0&&void 0===e.clockseq&&(p=p+1&16383),(y<0||l>i)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");i=l,d=v,t=p;var g=(1e4*(268435455&(l+=122192928e5))+v)%4294967296;c[a++]=g>>>24&255,c[a++]=g>>>16&255,c[a++]=g>>>8&255,c[a++]=255&g;var w=l/4294967296*1e4&268435455;c[a++]=w>>>8&255,c[a++]=255&w,c[a++]=w>>>24&15|16,c[a++]=w>>>16&255,c[a++]=p>>>8|128,c[a++]=255&p;for(var h=0;h<6;++h)c[a+h]=f[h];return o||function(e,o){var n=o||0,r=s;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")}(c)}}));
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e=e||self).uuidv1=o()}(this,(function(){"use strict";var e="undefined"!=typeof self&&(void 0!==self.crypto&&self.crypto.getRandomValues&&self.crypto.getRandomValues.bind(self.crypto)||void 0!==self.msCrypto&&self.msCrypto.getRandomValues&&self.msCrypto.getRandomValues.bind(self.msCrypto)),o=new Uint8Array(16);function t(){if(!e)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(o)}for(var n,r,s=[],u=0;u<256;++u)s[u]=(u+256).toString(16).substr(1);var i=0,d=0;return function(e,o,u){var f=o&&u||0,a=o||[],l=(e=e||{}).node||n,c=void 0!==e.clockseq?e.clockseq:r;if(null==l||null==c){var p=e.random||(e.rng||t)();null==l&&(l=n=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==c&&(c=r=16383&(p[6]<<8|p[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:d+1,y=v-i+(m-d)/1e4;if(y<0&&void 0===e.clockseq&&(c=c+1&16383),(y<0||v>i)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");i=v,d=m,r=c;var g=(1e4*(268435455&(v+=122192928e5))+m)%4294967296;a[f++]=g>>>24&255,a[f++]=g>>>16&255,a[f++]=g>>>8&255,a[f++]=255&g;var h=v/4294967296*1e4&268435455;a[f++]=h>>>8&255,a[f++]=255&h,a[f++]=h>>>24&15|16,a[f++]=h>>>16&255,a[f++]=c>>>8|128,a[f++]=255&c;for(var w=0;w<6;++w)a[f+w]=l[w];return o||function(e,o){var t=o||0,n=s;return[n[e[t++]],n[e[t++]],n[e[t++]],n[e[t++]],"-",n[e[t++]],n[e[t++]],"-",n[e[t++]],n[e[t++]],"-",n[e[t++]],n[e[t++]],"-",n[e[t++]],n[e[t++]],n[e[t++]],n[e[t++]],n[e[t++]],n[e[t++]]].join("")}(a)}}));

@@ -1,1 +0,1 @@

!function(o,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(o=o||self).uuidv4=e()}(this,(function(){"use strict";var o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),e=new Uint8Array(16);function r(){if(!o)throw new Error("uuid: This browser does not seem to support crypto.getRandomValues(). If you need to support this browser, please provide a custom random number generator through options.rng.");return o(e)}for(var n=[],t=0;t<256;++t)n[t]=(t+256).toString(16).substr(1);return function(o,e,t){var u=e&&t||0;"string"==typeof o&&(e="binary"===o?new Array(16):null,o=null);var i=(o=o||{}).random||(o.rng||r)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e)for(var s=0;s<16;++s)e[u+s]=i[s];return e||function(o,e){var r=e||0,t=n;return[t[o[r++]],t[o[r++]],t[o[r++]],t[o[r++]],"-",t[o[r++]],t[o[r++]],"-",t[o[r++]],t[o[r++]],"-",t[o[r++]],t[o[r++]],"-",t[o[r++]],t[o[r++]],t[o[r++]],t[o[r++]],t[o[r++]],t[o[r++]]].join("")}(i)}}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).uuidv4=t()}(this,(function(){"use strict";var e="undefined"!=typeof self&&(void 0!==self.crypto&&self.crypto.getRandomValues&&self.crypto.getRandomValues.bind(self.crypto)||void 0!==self.msCrypto&&self.msCrypto.getRandomValues&&self.msCrypto.getRandomValues.bind(self.msCrypto)),t=new Uint8Array(16);function n(){if(!e)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(t)}for(var o=[],r=0;r<256;++r)o[r]=(r+256).toString(16).substr(1);return function(e,t,r){var u=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||n)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var f=0;f<16;++f)t[u+f]=s[f];return t||function(e,t){var n=t||0,r=o;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")}(s)}}));
{
"name": "uuid",
"version": "7.0.1",
"version": "7.0.2-beta.0",
"description": "RFC4122 (v1, v4, and v5) UUIDs",

@@ -5,0 +5,0 @@ "commitlint": {

@@ -15,2 +15,3 @@ <!--

- Webpack and rollup.js module bundlers
- React Native ([see note](#getrandomvalues-not-supported))
- **Secure** - Cryptographically-strong random values

@@ -338,2 +339,12 @@ - **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers

## "getRandomValues() not supported"
This error occurs in environments where the standard
[`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues)
API is not supported. This issue can be resolved by adding an appropriate polyfill:
| Environment | Suggested Polyfill |
| ------------ | --------------------------------------------------------------------------------------------------- |
| React Native | [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme) |
## Upgrading From uuid\@3

@@ -340,0 +351,0 @@

@@ -7,3 +7,3 @@ const util = require('util');

v1,
"Deep requiring like `const uuidv1 = require('uuid/v1');` is deprecated as of uuid@7.x. Please require the top-level module when using the Node.js CommonJS module or use ECMAScript Modules when bundling for the browser. See https://github.com/uuidjs/uuid/blob/master/README.md#upgrading-from-v3x-of-this-module for more information.",
"Deep requiring like `const uuidv1 = require('uuid/v1');` is deprecated as of uuid@7.x. Please require the top-level module when using the Node.js CommonJS module or use ECMAScript Modules when bundling for the browser. See https://github.com/uuidjs/uuid#deep-requires-now-deprecated for more information.",
);

@@ -7,3 +7,3 @@ const util = require('util');

v3,
"Deep requiring like `const uuidv3 = require('uuid/v3');` is deprecated as of uuid@7.x. Please require the top-level module when using the Node.js CommonJS module or use ECMAScript Modules when bundling for the browser. See https://github.com/uuidjs/uuid/blob/master/README.md#upgrading-from-v3x-of-this-module for more information.",
"Deep requiring like `const uuidv3 = require('uuid/v3');` is deprecated as of uuid@7.x. Please require the top-level module when using the Node.js CommonJS module or use ECMAScript Modules when bundling for the browser. See https://github.com/uuidjs/uuid#deep-requires-now-deprecated for more information.",
);

@@ -7,3 +7,3 @@ const util = require('util');

v4,
"Deep requiring like `const uuidv4 = require('uuid/v4');` is deprecated as of uuid@7.x. Please require the top-level module when using the Node.js CommonJS module or use ECMAScript Modules when bundling for the browser. See https://github.com/uuidjs/uuid/blob/master/README.md#upgrading-from-v3x-of-this-module for more information.",
"Deep requiring like `const uuidv4 = require('uuid/v4');` is deprecated as of uuid@7.x. Please require the top-level module when using the Node.js CommonJS module or use ECMAScript Modules when bundling for the browser. See https://github.com/uuidjs/uuid#deep-requires-now-deprecated for more information.",
);

@@ -7,3 +7,3 @@ const util = require('util');

v5,
"Deep requiring like `const uuidv5 = require('uuid/v5');` is deprecated as of uuid@7.x. Please require the top-level module when using the Node.js CommonJS module or use ECMAScript Modules when bundling for the browser. See https://github.com/uuidjs/uuid/blob/master/README.md#upgrading-from-v5x-of-this-module for more information.",
"Deep requiring like `const uuidv5 = require('uuid/v5');` is deprecated as of uuid@7.x. Please require the top-level module when using the Node.js CommonJS module or use ECMAScript Modules when bundling for the browser. See https://github.com/uuidjs/uuid#deep-requires-now-deprecated for more information.",
);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc