diff options
author | Minteck <contact@minteck.org> | 2023-02-23 19:34:56 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2023-02-23 19:34:56 +0100 |
commit | 3d1cd02f27518f1a04374c7c8320cd5d82ede6e9 (patch) | |
tree | 75be5fba4368472fb11c8015aee026b2b9a71888 /together/node_modules/hexoid | |
parent | 8cc1f13c17fa2fb5a4410542d39e650e02945634 (diff) | |
download | pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.tar.gz pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.tar.bz2 pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.zip |
Updated 40 files, added 37 files, deleted 1103 files and renamed 3905 files (automated)
Diffstat (limited to 'together/node_modules/hexoid')
-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 | ||||
-rw-r--r-- | together/node_modules/hexoid/hexoid.d.ts | 1 | ||||
-rw-r--r-- | together/node_modules/hexoid/license | 9 | ||||
-rw-r--r-- | together/node_modules/hexoid/package.json | 41 | ||||
-rw-r--r-- | together/node_modules/hexoid/readme.md | 119 |
7 files changed, 0 insertions, 201 deletions
diff --git a/together/node_modules/hexoid/dist/index.js b/together/node_modules/hexoid/dist/index.js deleted file mode 100644 index a867b57..0000000 --- a/together/node_modules/hexoid/dist/index.js +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 4df2f2d..0000000 --- a/together/node_modules/hexoid/dist/index.min.js +++ /dev/null @@ -1 +0,0 @@ -!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 deleted file mode 100644 index b5e3fea..0000000 --- a/together/node_modules/hexoid/dist/index.mjs +++ /dev/null @@ -1,15 +0,0 @@ -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++]; - }; -} diff --git a/together/node_modules/hexoid/hexoid.d.ts b/together/node_modules/hexoid/hexoid.d.ts deleted file mode 100644 index 9b03069..0000000 --- a/together/node_modules/hexoid/hexoid.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (len?: number): () => string; diff --git a/together/node_modules/hexoid/license b/together/node_modules/hexoid/license deleted file mode 100644 index fa6089f..0000000 --- a/together/node_modules/hexoid/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/together/node_modules/hexoid/package.json b/together/node_modules/hexoid/package.json deleted file mode 100644 index df7097c..0000000 --- a/together/node_modules/hexoid/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "hexoid", - "version": "1.0.0", - "repository": "lukeed/hexoid", - "description": "A tiny (190B) and extremely fast utility to generate random IDs of fixed length", - "unpkg": "dist/index.min.js", - "module": "dist/index.mjs", - "main": "dist/index.js", - "types": "hexoid.d.ts", - "license": "MIT", - "author": { - "name": "Luke Edwards", - "email": "luke.edwards05@gmail.com", - "url": "https://lukeed.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "build": "bundt", - "pretest": "npm run build", - "test": "tape -r esm test/*.js | tap-spec" - }, - "files": [ - "*.d.ts", - "dist" - ], - "keywords": [ - "id", - "uid", - "uuid", - "random", - "generate" - ], - "devDependencies": { - "bundt": "1.0.0", - "esm": "3.2.25", - "tap-spec": "5.0.0", - "tape": "4.9.1" - } -} diff --git a/together/node_modules/hexoid/readme.md b/together/node_modules/hexoid/readme.md deleted file mode 100644 index b5a48fa..0000000 --- a/together/node_modules/hexoid/readme.md +++ /dev/null @@ -1,119 +0,0 @@ -# hexoid [![build status](https://badgen.net/github/status/lukeed/hexoid)](https://github.com/lukeed/hexoid/actions) [![codecov](https://badgen.now.sh/codecov/c/github/lukeed/hexoid)](https://codecov.io/gh/lukeed/hexoid) - -> A tiny (190B) and [extremely fast](#benchmarks) utility to generate random IDs of fixed length - -_**Hexadecimal object IDs.** Available for Node.js and the browser._<br>Generate randomized output strings of fixed length using lowercased hexadecimal pairs. - -> **Notice:** Please note that this is not a cryptographically secure (CSPRNG) generator. - -Additionally, this module is delivered as: - -* **CommonJS**: [`dist/index.js`](https://unpkg.com/hexoid/dist/index.js) -* **ES Module**: [`dist/index.mjs`](https://unpkg.com/hexoid/dist/index.mjs) -* **UMD**: [`dist/index.min.js`](https://unpkg.com/hexoid/dist/index.min.js) - -## Install - -``` -$ npm install --save hexoid -``` - - -## Usage - -```js -import hexoid from 'hexoid'; - -const toID = hexoid(); -// length = 16 (default) -toID(); //=> '52032fedb951da00' -toID(); //=> '52032fedb951da01' -toID(); //=> '52032fedb951da02' - -// customize length -hexoid(25)(); //=> '065359875047c63a037200e00' -hexoid(32)(); //=> 'ca8e4aec7f139d94fcab9cab2eb89f00' -hexoid(48)(); //=> 'c19a4deb5cdeca68534930e67bd0a2f4ed45988724d8d200' -``` - - -## API - -### hexoid(length?) -Returns: `() => string` - -Creates the function that will generate strings. - -#### length -Type: `Number`<br> -Default: `16` - -Then length of the output string. - -> **Important:** Your risk of collisions decreases with longer strings!<br>Please be aware of the [Birthday Problem](https://betterexplained.com/articles/understanding-the-birthday-paradox/)! You may need more combinations than you'd expect. - -The **maximum combinations** are known given the following formula: - -```js -const combos = 256 ** (len/2); -``` - - -## Benchmarks - -> Running on Node.js v10.13.0 - -``` -Validation (length = 16): - ✔ hashids/fixed (example: "LkQWjnegYbwZ1p0G") - ✔ nanoid/non-secure (example: "sLlVL5X3M5k2fo58") - ✔ uid (example: "3d0ckwcnjiuu91hj") - ✔ hexoid (example: "de96b62e663ef300") -Benchmark (length = 16): - hashids/fixed x 349,462 ops/sec ±0.28% (93 runs sampled) - nanoid/non-secure x 3,337,573 ops/sec ±0.28% (96 runs sampled) - uid x 3,553,482 ops/sec ±0.51% (90 runs sampled) - hexoid x 81,081,364 ops/sec ±0.18% (96 runs sampled) - - -Validation (length = 25): - ✔ cuid (example: "ck7lj5hbf00000v7c9gox6yfh") - ✔ hashids/fixed (example: "r9JOyLkQWjnegYbwZ1p0GDXNm") - ✔ nanoid/non-secure (example: "hI202PVPJQRNrP6o6z4pXz4m0") - ✔ uid (example: "9904e9w130buxaw7n8358mn2f") - ✔ hexoid (example: "01dfab2c14e37768eb7605a00") -Benchmark (length = 25): - cuid x 161,636 ops/sec ±1.36% (89 runs sampled) - hashids/fixed x 335,439 ops/sec ±2.40% (94 runs sampled) - nanoid/non-secure x 2,254,073 ops/sec ±0.23% (96 runs sampled) - uid x 2,483,275 ops/sec ±0.38% (95 runs sampled) - hexoid x 75,715,843 ops/sec ±0.27% (95 runs sampled) - - -Validation (length = 36): - ✔ uuid/v1 (example: "c3dc1ed0-629a-11ea-8bfb-8ffc49585f54") - ✔ uuid/v4 (example: "8c89f0ca-f01e-4c84-bd71-e645bab84552") - ✔ hashids/fixed (example: "EVq3Pr9JOyLkQWjnegYbwZ1p0GDXNmRBlAxg") - ✔ @lukeed/uuid (example: "069ad676-48f9-4452-b11d-f20c3872dc1f") - ✔ nanoid/non-secure (example: "jAZjrcDmHH6P1rT9EFdCdHUpF440SjAKwb2A") - ✔ uid (example: "5mhi30lgy5d0glmuy81llelbzdko518ow1sx") - ✔ hexoid (example: "615209331f0b4630acf69999ccfc95a23200") -Benchmark (length = 36): - uuid/v1 x 1,487,947 ops/sec ±0.18% (98 runs sampled) - uuid/v4 x 334,868 ops/sec ±1.08% (90 runs sampled) - @lukeed/uuid x 6,352,445 ops/sec ±0.27% (91 runs sampled) - hashids/fixed x 322,914 ops/sec ±0.27% (93 runs sampled) - nanoid/non-secure x 1,592,708 ops/sec ±0.25% (91 runs sampled) - uid x 1,789,492 ops/sec ±0.29% (92 runs sampled) - hexoid x 71,746,692 ops/sec ±0.29% (93 runs sampled) -``` - -## Related - -- [uid](https://github.com/lukeed/uid) - A smaller (134B) but slower variant of this module with a different API -- [@lukeed/uuid](https://github.com/lukeed/uuid) - A tiny (230B), fast, and cryptographically secure UUID (V4) generator for Node and the browser - - -## License - -MIT © [Luke Edwards](https://lukeed.com) |