diff options
author | Minteck <contact@minteck.org> | 2022-08-21 17:31:56 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-08-21 17:31:56 +0200 |
commit | a2df9a69dcc14cb70118cda2ded499055e7ee358 (patch) | |
tree | 6dd283e4e9452d38bce81ddaaae49b5335755842 /together/node_modules/hexoid/dist | |
parent | 84dd0735820b16b60f600284d35183d76547a71f (diff) | |
download | pluralconnect-a2df9a69dcc14cb70118cda2ded499055e7ee358.tar.gz pluralconnect-a2df9a69dcc14cb70118cda2ded499055e7ee358.tar.bz2 pluralconnect-a2df9a69dcc14cb70118cda2ded499055e7ee358.zip |
m. update
Diffstat (limited to 'together/node_modules/hexoid/dist')
-rw-r--r-- | together/node_modules/hexoid/dist/index.js | 15 | ||||
-rw-r--r-- | together/node_modules/hexoid/dist/index.min.js | 1 | ||||
-rw-r--r-- | together/node_modules/hexoid/dist/index.mjs | 15 |
3 files changed, 31 insertions, 0 deletions
diff --git a/together/node_modules/hexoid/dist/index.js b/together/node_modules/hexoid/dist/index.js new file mode 100644 index 0000000..a867b57 --- /dev/null +++ b/together/node_modules/hexoid/dist/index.js @@ -0,0 +1,15 @@ +var IDX=256, HEX=[]; +while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1); + +module.exports = function (len) { + len = len || 16; + var str='', num=0; + return function () { + if (!str || num === 256) { + str=''; num=(1+len)/2 | 0; + while (num--) str += HEX[256 * Math.random() | 0]; + str = str.substring(num=0, len-2); + } + return str + HEX[num++]; + }; +} diff --git a/together/node_modules/hexoid/dist/index.min.js b/together/node_modules/hexoid/dist/index.min.js new file mode 100644 index 0000000..4df2f2d --- /dev/null +++ b/together/node_modules/hexoid/dist/index.min.js @@ -0,0 +1 @@ +!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):n.hexoid=e()}(this,(function(){for(var n=256,e=[];n--;)e[n]=(n+256).toString(16).substring(1);return function(n){n=n||16;var t="",o=0;return function(){if(!t||256===o){for(t="",o=(1+n)/2|0;o--;)t+=e[256*Math.random()|0];t=t.substring(o=0,n-2)}return t+e[o++]}}}));
\ No newline at end of file diff --git a/together/node_modules/hexoid/dist/index.mjs b/together/node_modules/hexoid/dist/index.mjs new file mode 100644 index 0000000..b5e3fea --- /dev/null +++ b/together/node_modules/hexoid/dist/index.mjs @@ -0,0 +1,15 @@ +var IDX=256, HEX=[]; +while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1); + +export default function (len) { + len = len || 16; + var str='', num=0; + return function () { + if (!str || num === 256) { + str=''; num=(1+len)/2 | 0; + while (num--) str += HEX[256 * Math.random() | 0]; + str = str.substring(num=0, len-2); + } + return str + HEX[num++]; + }; +} |