uuid 7.0.2-beta.0 → 7.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [7.0.2](https://github.com/uuidjs/uuid/compare/v7.0.1...v7.0.2) (2020-03-04)
6
+
7
+ ### Bug Fixes
8
+
9
+ - make access to msCrypto consistent ([#393](https://github.com/uuidjs/uuid/issues/393)) ([8bf2a20](https://github.com/uuidjs/uuid/commit/8bf2a20f3565df743da7215eebdbada9d2df118c))
10
+ - simplify link in deprecation warning ([#391](https://github.com/uuidjs/uuid/issues/391)) ([bb2c8e4](https://github.com/uuidjs/uuid/commit/bb2c8e4e9f4c5f9c1eaaf3ea59710c633cd90cb7))
11
+ - update links to match content in readme ([#386](https://github.com/uuidjs/uuid/issues/386)) ([44f2f86](https://github.com/uuidjs/uuid/commit/44f2f86e9d2bbf14ee5f0f00f72a3db1292666d4))
12
+
5
13
  ### [7.0.1](https://github.com/uuidjs/uuid/compare/v7.0.0...v7.0.1) (2020-02-25)
6
14
 
7
15
  ### Bug Fixes
package/README.md CHANGED
@@ -12,7 +12,7 @@ For the creation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDs
12
12
  - Node 8, 10, 12
13
13
  - Chrome, Safari, Firefox, Edge, IE 11 browsers
14
14
  - Webpack and rollup.js module bundlers
15
- - React Native ([see note](#getrandomvalues-not-supported))
15
+ - [React Native](#react-native)
16
16
  - **Secure** - Cryptographically-strong random values
17
17
  - **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers
18
18
  - **CLI** - Includes the [`uuid` command line](#command-line) utility
@@ -341,9 +341,21 @@ This error occurs in environments where the standard
341
341
  [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues)
342
342
  API is not supported. This issue can be resolved by adding an appropriate polyfill:
343
343
 
344
- | Environment | Suggested Polyfill |
345
- | ------------ | --------------------------------------------------------------------------------------------------- |
346
- | React Native | [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme) |
344
+ ### React Native
345
+
346
+ 1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme)
347
+ 1. Import it before `uuid`:
348
+
349
+ ```javascript
350
+ import 'react-native-get-random-values';
351
+ import { v4 as uuidv4 } from 'uuid';
352
+ ```
353
+
354
+ ### Web Workers / Service Workers (Edge <= 18)
355
+
356
+ [In Edge <= 18, Web Crypto is not supported in Web Workers or Service
357
+ Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if
358
+ you find one, please).
347
359
 
348
360
  ## Upgrading From uuid\@3
349
361
 
@@ -3,9 +3,7 @@
3
3
  // generators (like Math.random()).
4
4
  // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
5
5
  // find the complete implementation of crypto (msCrypto) on IE11.
6
- // Use self in order to support WebWorkers as well, see
7
- // https://developer.mozilla.org/en-US/docs/Web/API/Window/self
8
- 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));
6
+ var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto);
9
7
  var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
10
8
 
11
9
  export default function rng() {
@@ -9,9 +9,7 @@ exports.default = rng;
9
9
  // generators (like Math.random()).
10
10
  // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
11
11
  // find the complete implementation of crypto (msCrypto) on IE11.
12
- // Use self in order to support WebWorkers as well, see
13
- // https://developer.mozilla.org/en-US/docs/Web/API/Window/self
14
- 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));
12
+ var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto);
15
13
  var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
16
14
 
17
15
  function rng() {
@@ -1 +1 @@
1
- !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
+ !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 msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),e=new Uint8Array(16);function t(){if(!n)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");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 v(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 d(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 d((u=d(d(n,r),d(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=v("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=d(f,t),c=d(c,o),i=d(i,a),s=d(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 A(r,n){return r<<n|r>>>32-n}var w=v("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]=A(i[s-3]^i[s-8]^i[s-14]^i[s-16],1);var v=e[0],d=e[1],l=e[2],p=e[3],y=e[4];for(s=0;s<80;s++){var h=Math.floor(s/20),g=A(v,5)+b(h,d,l,p)+y+n[h]+i[s]>>>0;y=p,p=l,l=A(d,30)>>>0,d=v,v=g}e[0]=e[0]+v>>>0,e[1]=e[1]+d>>>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||[],v=(r=r||{}).node||o,d=void 0!==r.clockseq?r.clockseq:a;if(null==v||null==d){var l=r.random||(r.rng||t)();null==v&&(v=o=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==d&&(d=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&&(d=d+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=d;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++]=d>>>8|128,f[u++]=255&d;for(var b=0;b<6;++b)f[u+b]=v[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=w,Object.defineProperty(r,"__esModule",{value:!0})}));
@@ -1 +1 @@
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 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
+ !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 msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),o=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(o)}for(var t,r,u=[],s=0;s<256;++s)u[s]=(s+256).toString(16).substr(1);var i=0,d=0;return function(e,o,s){var a=o&&s||0,c=o||[],f=(e=e||{}).node||t,p=void 0!==e.clockseq?e.clockseq:r;if(null==f||null==p){var l=e.random||(e.rng||n)();null==f&&(f=t=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==p&&(p=r=16383&(l[6]<<8|l[7]))}var m=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:d+1,y=m-i+(v-d)/1e4;if(y<0&&void 0===e.clockseq&&(p=p+1&16383),(y<0||m>i)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");i=m,d=v,r=p;var g=(1e4*(268435455&(m+=122192928e5))+v)%4294967296;c[a++]=g>>>24&255,c[a++]=g>>>16&255,c[a++]=g>>>8&255,c[a++]=255&g;var h=m/4294967296*1e4&268435455;c[a++]=h>>>8&255,c[a++]=255&h,c[a++]=h>>>24&15|16,c[a++]=h>>>16&255,c[a++]=p>>>8|128,c[a++]=255&p;for(var w=0;w<6;++w)c[a+w]=f[w];return o||function(e,o){var n=o||0,t=u;return[t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],"-",t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]],t[e[n++]]].join("")}(c)}}));
@@ -1 +1 @@
1
- !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)}}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).uuidv4=e()}(this,(function(){"use strict";var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),e=new Uint8Array(16);function n(){if(!t)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t(e)}for(var o=[],r=0;r<256;++r)o[r]=(r+256).toString(16).substr(1);return function(t,e,r){var u=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var i=(t=t||{}).random||(t.rng||n)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e)for(var d=0;d<16;++d)e[u+d]=i[d];return e||function(t,e){var n=e||0,r=o;return[r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]]].join("")}(i)}}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uuid",
3
- "version": "7.0.2-beta.0",
3
+ "version": "7.0.2",
4
4
  "description": "RFC4122 (v1, v4, and v5) UUIDs",
5
5
  "commitlint": {
6
6
  "extends": [