mirror of
https://github.com/josdejong/mathjs.git
synced 2025-12-08 19:46:04 +00:00
20 lines
368 B
JavaScript
20 lines
368 B
JavaScript
module.exports = function (math) {
|
|
var object = require('../../util/object');
|
|
|
|
/**
|
|
* Clone an object
|
|
*
|
|
* clone(x)
|
|
*
|
|
* @param {*} x
|
|
* @return {*} clone
|
|
*/
|
|
math.clone = function clone (x) {
|
|
if (arguments.length != 1) {
|
|
throw new math.error.ArgumentsError('clone', arguments.length, 1);
|
|
}
|
|
|
|
return object.clone(x);
|
|
};
|
|
};
|