This commit is contained in:
2019-02-17 18:07:28 +01:00
parent c69ffb9752
commit 95cff6f702
2301 changed files with 307810 additions and 5 deletions

1
Client/node_modules/math-random/.npmignore generated vendored Executable file
View File

@@ -0,0 +1 @@
node_modules/*

6
Client/node_modules/math-random/.travis.yml generated vendored Executable file
View File

@@ -0,0 +1,6 @@
language: node_js
node_js:
- "6"
- "4"
- "0.12"
- "0.10"

17
Client/node_modules/math-random/browser.js generated vendored Executable file
View File

@@ -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 && crypto && 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)

13
Client/node_modules/math-random/node.js generated vendored Executable file
View File

@@ -0,0 +1,13 @@
var crypto = require('crypto')
var max = Math.pow(2, 32)
module.exports = random
module.exports.cryptographic = true
function random () {
var buf = crypto
.randomBytes(4)
.toString('hex')
return parseInt(buf, 16) / max
}

58
Client/node_modules/math-random/package.json generated vendored Executable file
View File

@@ -0,0 +1,58 @@
{
"_from": "math-random@^1.0.1",
"_id": "math-random@1.0.1",
"_inBundle": false,
"_integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=",
"_location": "/math-random",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "math-random@^1.0.1",
"name": "math-random",
"escapedName": "math-random",
"rawSpec": "^1.0.1",
"saveSpec": null,
"fetchSpec": "^1.0.1"
},
"_requiredBy": [
"/randomatic"
],
"_resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz",
"_shasum": "8b3aac588b8a66e4975e3cdea67f7bb329601fac",
"_spec": "math-random@^1.0.1",
"_where": "/home/nathan/Projects/Upsilon/UpsilonVsCodeLanguageServer/Client/node_modules/randomatic",
"author": {
"name": "Michael Rhodes"
},
"browser": "browser.js",
"bugs": {
"url": "https://github.com/michaelrhodes/math-random/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "a drop-in replacement for Math.random that uses cryptographically secure random number generation, where available",
"devDependencies": {
"array-unique": "~0.2.1",
"tape": "~4.2.2"
},
"homepage": "https://github.com/michaelrhodes/math-random",
"keywords": [
"Math.random",
"crypto.getRandomValues"
],
"license": "MIT",
"main": "node.js",
"name": "math-random",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/michaelrhodes/math-random.git"
},
"scripts": {
"test": "tape test.js"
},
"testling": {
"files": "test.js"
},
"version": "1.0.1"
}

26
Client/node_modules/math-random/readme.md generated vendored Executable file
View File

@@ -0,0 +1,26 @@
# math-random
math-random is an drop-in replacement for Math.random that uses cryptographically secure random number generation, where available. It works in both browser and node environments.
[![Build status](https://travis-ci.org/michaelrhodes/math-random.svg?branch=master)](https://travis-ci.org/michaelrhodes/math-random)
## Install
```sh
npm install math-random
```
### Usage
```js
var random = require('math-random')
console.log(random())
=> 0.584293719381094
console.log(random.cryptographic)
=> true || undefined
```
### License
[MIT](http://opensource.org/licenses/MIT)

26
Client/node_modules/math-random/test.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
var test = require('tape')
var unique = require('array-unique')
var random = require('./')
test('it works', function (assert) {
var number, l = 1000, cache = []
for (var i = 0; i < l; i++) {
number = random()
if (number <= 0) {
assert.fail('a random number was less than or equal to zero')
assert.end()
return
}
if (number >= 1) {
assert.fail('a random number was greater than or equal to one')
assert.end()
return
}
cache.push(number)
}
assert.pass('all ' + l + ' random numbers were greater than zero and less than one')
assert.equal(cache.length, unique(cache).length, 'all ' + l + ' random numbers were unique')
assert.end()
})