Galerie und tage

This commit is contained in:
2021-11-23 17:56:26 +01:00
parent ff35366279
commit 5f873bee89
4693 changed files with 149659 additions and 301447 deletions

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

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

17
node_modules/math-random/browser.js generated vendored Normal 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 && 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
node_modules/math-random/node.js generated vendored Normal 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)
.readUInt32BE(0)
return buf / max
}

16
node_modules/math-random/package.json generated vendored Normal file
View File

@@ -0,0 +1,16 @@
{
"name": "math-random",
"author": "Michael Rhodes",
"version": "1.0.4",
"main": "node.js",
"browser": "browser.js",
"repository": "github:michaelrhodes/math-random",
"license": "MIT",
"scripts": {
"test": "dexy test.js"
},
"devDependencies": {
"array-unique": "~0.2.1",
"dexy": "github:michaelrhodes/dexy#1.0.1"
}
}

26
node_modules/math-random/readme.md generated vendored Normal 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)

21
node_modules/math-random/test.js generated vendored Normal file
View File

@@ -0,0 +1,21 @@
var assert = console.assert
var unique = require('array-unique')
var random = require('./')
var iterations = 10000
var number, cache = []
for (var i = 0; i < iterations; i++) {
number = random()
if (number < 0) {
assert(false, 'Random numbers should be greater than or equal to zero')
break
}
if (number >= 1) {
assert(false, 'Random numbers should be less than one')
break
}
cache.push(number)
}
assert(unique(cache).length === iterations, 'Random numbers should be unique')