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

17 lines (13 loc) 427 B
// Note: This file is used by the file ./index.js function factory (type, config, load, typed) { // create a new typed function using MyType // when imported in math.js, this will extend the // existing function `add` with support for MyType return typed('add', { 'MyType, MyType': function (a, b) { return new type.MyType(a.value + b.value); } }); } exports.name = 'add'; exports.factory = factory;