(factories, config)
| 97 | * - `on`, `off`, `once`, `emit` for events |
| 98 | */ |
| 99 | export function create (factories, config) { |
| 100 | const configInternal = Object.assign({}, DEFAULT_CONFIG, config) |
| 101 | |
| 102 | // simple test for ES5 support |
| 103 | if (typeof Object.create !== 'function') { |
| 104 | throw new Error('ES5 not supported by this JavaScript engine. ' + |
| 105 | 'Please load the es5-shim and es5-sham library for compatibility.') |
| 106 | } |
| 107 | |
| 108 | // create the mathjs instance |
| 109 | const math = emitter.mixin({ |
| 110 | // only here for backward compatibility for legacy factory functions |
| 111 | isNumber, |
| 112 | isComplex, |
| 113 | isBigNumber, |
| 114 | isBigInt, |
| 115 | isFraction, |
| 116 | isUnit, |
| 117 | isString, |
| 118 | isArray, |
| 119 | isMatrix, |
| 120 | isCollection, |
| 121 | isDenseMatrix, |
| 122 | isSparseMatrix, |
| 123 | isRange, |
| 124 | isIndex, |
| 125 | isBoolean, |
| 126 | isResultSet, |
| 127 | isHelp, |
| 128 | isFunction, |
| 129 | isDate, |
| 130 | isRegExp, |
| 131 | isObject, |
| 132 | isMap, |
| 133 | isPartitionedMap, |
| 134 | isObjectWrappingMap, |
| 135 | isNull, |
| 136 | isUndefined, |
| 137 | |
| 138 | isAccessorNode, |
| 139 | isArrayNode, |
| 140 | isAssignmentNode, |
| 141 | isBlockNode, |
| 142 | isConditionalNode, |
| 143 | isConstantNode, |
| 144 | isFunctionAssignmentNode, |
| 145 | isFunctionNode, |
| 146 | isIndexNode, |
| 147 | isNode, |
| 148 | isObjectNode, |
| 149 | isOperatorNode, |
| 150 | isParenthesisNode, |
| 151 | isRangeNode, |
| 152 | isRelationalNode, |
| 153 | isSymbolNode, |
| 154 | |
| 155 | isChain |
| 156 | }) |
no test coverage detected
searching dependent graphs…