Actualizacion maquina principal
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / math-random / browser.js
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/math-random/browser.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/math-random/browser.js
new file mode 100644 (file)
index 0000000..479a5f6
--- /dev/null
@@ -0,0 +1,17 @@
+module.exports = (function (global) {
+  var uint32 = 'Uint32Array' in global
+  var crypto = global.crypto || global.msCrypto
+  var rando = crypto && typeof crypto.getRandomValues === 'function'
+  var good = uint32 && rando
+  if (!good) return Math.random
+
+  var arr = new Uint32Array(1)
+  var max = Math.pow(2, 32)
+  function random () {
+    crypto.getRandomValues(arr)
+    return arr[0] / max
+  }
+
+  random.cryptographic = true
+  return random
+})(typeof self !== 'undefined' ? self : window)