Skip to content

Refactor wth spread helper#2

Merged
KevinBatdorf merged 1 commit into
mainfrom
add-spread-helper
Jul 21, 2025
Merged

Refactor wth spread helper#2
KevinBatdorf merged 1 commit into
mainfrom
add-spread-helper

Conversation

@KevinBatdorf

Copy link
Copy Markdown
Owner

This refactors the wat style helpers so instead of

return new Uint8Array([
  ...header,
  ...typeSection,
  ...importSection,
  ...funcSection,
  ...memorySection,
  ...globalSection,
  ...exportSection,
  ...codeSection,
  ...dataSection,
]);

I can write this

return wat(
  header,
  typeSection,
  importSection,
  funcSection,
  memorySection,
  globalSection,
  exportSection,
  codeSection,
  dataSection,
);

@KevinBatdorf KevinBatdorf merged commit 11f59c8 into main Jul 21, 2025
1 check passed
@KevinBatdorf KevinBatdorf deleted the add-spread-helper branch July 21, 2025 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant