Skip to content

refactor(json): simplify strict mode error string construction - #692

Merged
UlisesGascon merged 2 commits into
expressjs:1.xfrom
jonchurch:1x-strict-mode-error
Jan 6, 2026
Merged

UlisesGascon merged 2 commits into
expressjs:1.xfrom
jonchurch:1x-strict-mode-error

Conversation

@jonchurch

@jonchurch jonchurch commented Jan 5, 2026 •

Copy link
Copy Markdown
Member

refactor the way we create strict mode error strings

the concat in a loop is the least efficient way across memory and operations to do this, so refactor to approach that uses fewer allocations and operations

Different approach from #693 bc of node version requirements not allowing us to use string.repeat()

@UlisesGascon UlisesGascon mentioned this pull request Jan 5, 2026
2 tasks done
@UlisesGascon
UlisesGascon merged commit 2c55e2f into expressjs:1.x Jan 6, 2026
@jonchurch
jonchurch deleted the 1x-strict-mode-error branch January 8, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants