mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-06 06:17:11 -04:00
🔧:build SSR dist and deploy
This commit is contained in:
parent
76c26901d7
commit
c59ad6aedb
465 changed files with 214127 additions and 2 deletions
14
dist/server/chunks/chunk-11f44f81.js
vendored
Normal file
14
dist/server/chunks/chunk-11f44f81.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
const random = () => Math.random();
|
||||
const randFromArray = (array) => array[Math.floor(random() * array.length)];
|
||||
const randIntFromInterval = (min, max) => Math.floor(random() * (max - min) + min);
|
||||
function shuffleArrayMutate(array) {
|
||||
for (let i = array.length - 1; i > 0; i--) {
|
||||
const j = Math.floor(Math.random() * (i + 1));
|
||||
[array[i], array[j]] = [array[j], array[i]];
|
||||
}
|
||||
return array;
|
||||
}
|
||||
const shuffleString = (str, delimiter = "") => shuffleArrayMutate(str.split(delimiter)).join(delimiter);
|
||||
const generateRandomId = () => `id-${random().toString(36).substring(2, 12)}`;
|
||||
|
||||
export { randIntFromInterval as a, generateRandomId as g, randFromArray as r, shuffleString as s };
|
Loading…
Add table
Add a link
Reference in a new issue