mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-18 14:59:29 +00:00
13 lines
263 B
JavaScript
13 lines
263 B
JavaScript
'use strict';
|
|
|
|
var isMatrix = require('./isMatrix');
|
|
|
|
/**
|
|
* 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) || isMatrix(x);
|
|
};
|