UNPKG

mathjs

Version:

Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif

27 lines (23 loc) 655 B
'use strict'; var errorTransform = require('./error.transform').transform; /** * 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 */ function factory(type, config, load, typed) { var subset = load(require('../../function/matrix/subset')); return typed('subset', { '...any': function any(args) { try { return subset.apply(null, args); } catch (err) { throw errorTransform(err); } } }); } exports.name = 'subset'; exports.path = 'expression.transform'; exports.factory = factory;