mirror of
https://github.com/Nezumi-2711/cloudflare-gateway-pihole-scripts.git
synced 2026-09-22 13:38:37 +00:00
reorganized code
This commit is contained in:
@@ -4,3 +4,11 @@
|
||||
*/
|
||||
export const sleep = (ms = 350) =>
|
||||
new Promise((resolve) => setTimeout(resolve, ms));
|
||||
|
||||
/**
|
||||
* Truncates an array to the specified size.
|
||||
* @param {any[]} arr The array to be truncated.
|
||||
* @param {number} size The size to which the array will be truncated.
|
||||
* @returns {any[]}
|
||||
*/
|
||||
export const truncateArray = (arr, size) => arr.slice(0, size);
|
||||
|
||||
Reference in New Issue
Block a user