refactor: replace deepCopy with structuredClone

This commit is contained in:
Azgaar 2026-03-09 23:05:27 +01:00
parent 7a49098425
commit 1116cc5e0f
9 changed files with 123 additions and 142 deletions

View file

@ -26,7 +26,6 @@ window.list = list;
import {
createTypedArray,
deepCopy,
getTypedArray,
last,
TYPED_ARRAY_MAX_VALUES,
@ -35,7 +34,6 @@ import {
window.last = last;
window.unique = unique;
window.deepCopy = deepCopy;
window.getTypedArray = getTypedArray;
window.createTypedArray = createTypedArray;
window.INT8_MAX = TYPED_ARRAY_MAX_VALUES.INT8_MAX;
@ -274,90 +272,89 @@ window.drawPoint = drawPoint;
window.drawPath = drawPath;
export {
rn,
lim,
minmax,
normalize,
lerp,
isVowel,
trimVowels,
getAdjective,
nth,
abbreviate,
list,
last,
unique,
deepCopy,
getTypedArray,
createTypedArray,
TYPED_ARRAY_MAX_VALUES,
rand,
P,
each,
gauss,
Pint,
biased,
generateSeed,
getNumberInRange,
ra,
rw,
convertTemperature,
si,
getIntegerFromSI,
toHEX,
getColors,
getRandomColor,
getMixedColor,
C_12,
getComposedPath,
getNextId,
rollups,
distanceSquared,
getIsolines,
getPolesOfInaccessibility,
connectVertices,
findPath,
getVertexPath,
round,
capitalize,
splitInTwo,
parseTransform,
isValidJSON,
safeParseJSON,
sanitizeId,
byId,
shouldRegenerateGrid,
generateGrid,
findGridAll,
findGridCell,
findClosestCell,
C_12,
calculateVoronoi,
findAllCellsInRadius,
getPackPolygon,
getGridPolygon,
poissonDiscSampler,
isLand,
isWater,
findAllInQuadtree,
drawHeights,
capitalize,
clipPoly,
getSegmentId,
connectVertices,
convertTemperature,
createTypedArray,
debounce,
throttle,
parseError,
getBase64,
openURL,
wiki,
link,
isCtrlClick,
generateDate,
getLongitude,
getLatitude,
getCoordinates,
initializePrompt,
distanceSquared,
drawCellsValue,
drawHeights,
drawPath,
drawPoint,
drawPolygons,
drawRouteConnections,
drawPoint,
drawPath,
each,
findAllCellsInRadius,
findAllInQuadtree,
findClosestCell,
findGridAll,
findGridCell,
findPath,
gauss,
generateDate,
generateGrid,
generateSeed,
getAdjective,
getBase64,
getColors,
getComposedPath,
getCoordinates,
getGridPolygon,
getIntegerFromSI,
getIsolines,
getLatitude,
getLongitude,
getMixedColor,
getNextId,
getNumberInRange,
getPackPolygon,
getPolesOfInaccessibility,
getRandomColor,
getSegmentId,
getTypedArray,
getVertexPath,
initializePrompt,
isCtrlClick,
isLand,
isValidJSON,
isVowel,
isWater,
last,
lerp,
lim,
link,
list,
minmax,
normalize,
nth,
openURL,
P,
parseError,
parseTransform,
Pint,
poissonDiscSampler,
ra,
rand,
rn,
rollups,
round,
rw,
safeParseJSON,
sanitizeId,
shouldRegenerateGrid,
si,
splitInTwo,
throttle,
toHEX,
trimVowels,
TYPED_ARRAY_MAX_VALUES,
unique,
wiki,
};