npm / @thednp/dommatrix
@thednp/dommatrix
What changed in @thednp/dommatrix 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
1 breaking2 new APIs and options19 performance2 tooling
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@thednp/dommatrix 324 changes
Breaking changes 1
Now mutates the matrix in place and returns this, matching native DOMMatrix.setMatrixValue(); previously it returned a new matrix and left the original untouched.
New APIs and options 2
Now accepts an optional target instance, allowing array values to be written directly into an existing instance instead of allocating a new one.
Now accepts an optional target instance, allowing object values to be written directly into an existing instance instead of allocating a new one.
Performance 19
Construction fast-paths string, array, typed-array, and object initializers, improving construction performance without changing parity.
Validates and destructures input directly, avoiding an intermediate Array copy.
Validates and destructures input directly, avoiding an intermediate Array copy.
Parses transform lists with a single regex iteration while retaining strict validation of non-transform garbage.
Uses a shared multiplication kernel; measured performance is about 7x the 3.0.7 snapshot.
Uses a shared multiplication kernel and writes into the receiver instead of allocating and spreading a result object; measured performance is about 17–18x the 3.0.7 snapshot.
Measured performance is about 5–5.6x the 3.0.7 snapshot.
Measured performance is about 4.1–4.5x the 3.0.7 snapshot.
Uses specialized pre-multiply math instead of general matrix multiplication; measured performance is about 13x the 3.0.7 snapshot.
Uses specialized pre-multiply math instead of general matrix multiplication.
Uses specialized pre-multiply math instead of general matrix multiplication; measured performance is about 6–14x the 3.0.7 snapshot.
Uses specialized pre-multiply math instead of general matrix multiplication.
Delegates to skew(), which uses specialized pre-multiply math instead of general matrix multiplication.
Delegates to skew(), which uses specialized pre-multiply math instead of general matrix multiplication.
Builds the typed array directly, skipping the intermediate toArray() allocation.
Builds the typed array directly, skipping the intermediate toArray() allocation.
Builds the result object with explicit property writes instead of spreading the matrix; measured performance is about 9.7–10.1x the 3.0.7 snapshot.
Uses specialized pre-multiply math instead of general matrix multiplication; measured performance is about 6.5–13x the 3.0.7 snapshot.
Uses specialized pre-multiply math instead of general matrix multiplication.
Tooling 2
Runs the new parity and performance benchmark suite against a snapshot of the previous release.
Runs the new parity and performance benchmark suite comparing the implementation with the browser's native DOMMatrix.