Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "uuid-v4.js", | ||
"description": "random uuid (rfc-4122 v4) generator", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"keywords": ["ender", "uuid"], | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/makeable/uuid-v4.js", |
@@ -36,2 +36,7 @@ /* | ||
var dec2hex = []; | ||
for (var i=0; i<=15; i++) { | ||
dec2hex[i] = i.toString(16); | ||
} | ||
var UUID = function() { | ||
@@ -45,5 +50,5 @@ var uuid = ''; | ||
} else if (i===20) { | ||
uuid += (Math.random()*4|0 + 8).toString(16); | ||
uuid += dec2hex[(Math.random()*4|0 + 8)]; | ||
} else { | ||
uuid += (Math.random()*15|0).toString(16); | ||
uuid += dec2hex[(Math.random()*15|0)]; | ||
} | ||
@@ -50,0 +55,0 @@ } |
@@ -1,1 +0,1 @@ | ||
(function(){var b=function(){for(var b="",a=1;a<=36;a++)b+=a===9||a===14||a===19||a===24?"-":a===15?4:a===20?(Math.random()*4|8).toString(16):(Math.random()*15|0).toString(16);return b};typeof exports!=="undefined"?module.exports=b:this.UUID=b})(this); | ||
(function(){var a=[];for(var b=0;b<=15;b++)a[b]=b.toString(16);var c=function(){var b="";for(var c=1;c<=36;c++)c===9||c===14||c===19||c===24?b+="-":c===15?b+=4:c===20?b+=a[Math.random()*4|8]:b+=a[Math.random()*15|0];return b};typeof exports!="undefined"?module.exports=c:this.UUID=c})(this); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4873
7
55