Fix #2876: use the number only implementation of mathjs in example custom_evaluate_using_factories.js

This commit is contained in:
Jos de Jong 2023-01-13 15:33:40 +01:00
parent 3799fa658e
commit cb168f60d9
2 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,7 @@
const { create, evaluateDependencies, factory } = require('../..')
// we use the number only implementation in order to not pull in
// the `Unit` class for example. when using as library,
// use require('mathjs/number')
const { create, evaluateDependencies, factory } = require('../../lib/cjs/number.js')
// custom implementations of all functions you want to support
const add = (a, b) => a + b

View File

@ -1,4 +1,7 @@
const { create, evaluateDependencies } = require('../..')
// we use the number only implementation in order to not pull in
// the `Unit` class for example. when using as library,
// use require('mathjs/number')
const { create, evaluateDependencies } = require('../../lib/cjs/number.js')
// custom implementations of all functions you want to support
const add = (a, b) => a + b