.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / math-random / browser.js
1 module.exports = (function (global) {
2   var uint32 = 'Uint32Array' in global
3   var crypto = global.crypto || global.msCrypto
4   var rando = crypto && typeof crypto.getRandomValues === 'function'
5   var good = uint32 && rando
6   if (!good) return Math.random
7
8   var arr = new Uint32Array(1)
9   var max = Math.pow(2, 32)
10   function random () {
11     crypto.getRandomValues(arr)
12     return arr[0] / max
13   }
14
15   random.cryptographic = true
16   return random
17 })(typeof self !== 'undefined' ? self : window)