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

refactor(json): simplify strict mode error string construction#692
UlisesGascon merged 2 commits into
expressjs:1.xfrom
jonchurch:1x-strict-mode-error

Conversation

@jonchurch

@jonchurchjonchurch 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()

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jonchurch@UlisesGascon@efekrskl