mirror of
https://github.com/josdejong/mathjs.git
synced 2025-12-08 19:46:04 +00:00
11 lines
241 B
JavaScript
11 lines
241 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Test whether a value is a collection: an Array or Matrix
|
|
* @param {*} x
|
|
* @returns {boolean} isCollection
|
|
*/
|
|
module.exports = function isCollection (x) {
|
|
return (Array.isArray(x) || (x && x.isMatrix === true));
|
|
};
|