mirror of
https://github.com/josdejong/mathjs.git
synced 2025-12-08 19:46:04 +00:00
24 lines
619 B
JavaScript
24 lines
619 B
JavaScript
'use strict';
|
|
|
|
var errorTransform = require('./error.transform').transform;
|
|
var isBoolean = require('../../util/boolean').isBoolean;
|
|
var argsToArray = require('../../util/array').argsToArray;
|
|
|
|
/**
|
|
* Attach a transform function to math.subset
|
|
* Adds a property transform containing the transform function.
|
|
*
|
|
* This transform creates a range which includes the end value
|
|
* @param {Object} math
|
|
*/
|
|
module.exports = function (math) {
|
|
math.subset.transform = function () {
|
|
try {
|
|
return math.subset.apply(math, argsToArray(arguments));
|
|
}
|
|
catch (err) {
|
|
throw errorTransform(err);
|
|
}
|
|
};
|
|
};
|