dot.dot.dot.exampol
This commit is contained in:
commit
a0bc2d79de
406 changed files with 34577 additions and 0 deletions
24
node_modules/lnsocket/lnsocket_pre.js
generated
vendored
Normal file
24
node_modules/lnsocket/lnsocket_pre.js
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
Module.getRandomValue = (function() {
|
||||
const window_ = "object" === typeof window ? window : this
|
||||
const crypto_ = typeof window_.crypto !== "undefined" ? window_.crypto : window_.msCrypto;
|
||||
|
||||
let randomBytesNode
|
||||
if (!crypto_) {
|
||||
randomBytesNode = require('crypto').randomBytes
|
||||
fn = randomValuesNode
|
||||
} else {
|
||||
fn = randomValuesStandard
|
||||
}
|
||||
|
||||
function randomValuesNode() {
|
||||
return randomBytesNode(1)[0] >>> 0
|
||||
}
|
||||
|
||||
function randomValuesStandard() {
|
||||
var buf = new Uint32Array(1);
|
||||
crypto_.getRandomValues(buf);
|
||||
return buf[0] >>> 0;
|
||||
};
|
||||
|
||||
return fn
|
||||
})()
|
Loading…
Add table
Add a link
Reference in a new issue