Initial commit

This commit is contained in:
Brian McGonagill 2026-03-18 09:02:21 -05:00
commit b3a51a4115
10336 changed files with 2381973 additions and 0 deletions

View file

@ -0,0 +1 @@
{"version":3,"file":"swapInPlace-BGus-EG1.cjs","names":[],"sources":["../src/internal/swapInPlace.ts"],"sourcesContent":["/**\n * An efficient hack to swap the values at two indices in an array *in-place*.\n */\nexport function swapInPlace(\n // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types -- Intentional\n data: unknown[],\n i: number,\n j: number,\n): void {\n // We use destructuring to perform an in-place swap *without* needing a\n // temporary variable\n [data[i], data[j]] = [data[j], data[i]];\n}\n"],"mappings":"AAGA,SAAgB,EAEd,EACA,EACA,EACM,CAGN,CAAC,EAAK,GAAI,EAAK,IAAM,CAAC,EAAK,GAAI,EAAK,GAAG"}