mathjs/lib/function/algebra/simplify.transform.js
2015-08-25 00:59:42 +00:00

29 lines
731 B
JavaScript

'use strict';
function factory (type, config, load, typed) {
var simplify = load(require('./simplify'));
/**
* A transformation for the simplify function. This transformation will be
* invoked when the function is used via the expression parser of math.js.
*
* @param {Array.<Node>} args
* Expects the following arguments: [f, x]
* @param {Object} math
* @param {Object} [scope]
*/
var simplifyTransform = typed('simplify', {
'Array, Object, Object': function (args) {
return simplify.apply(null, args);
}
});
simplifyTransform.rawArgs = true;
return simplifyTransform;
}
exports.name = 'simplify';
exports.path = 'expression.transform';
exports.factory = factory;