isMatrix
Returns whether a value is a valid matrix, using the same structure rule as
from but without cloning.
API Reference
Signature
Parameters
Returns
true for a plain object whose own enumerable string keys all map to dense
arrays; false otherwise. Does not clone.
Throws
Does not throw.
Agent Contract
Agent Notes
- Use
isMatrixfor control flow; use assertMatrix to throw, or from to validate and clone in one step. - Sparse-array rows are rejected, matching
from.