MCPcopy
hub / github.com/josdejong/mathjs / create

Function create

src/core/create.js:99–255  ·  view source on GitHub ↗
(factories, config)

Source from the content-addressed store, hash-verified

97 * - `on`, `off`, `once`, `emit` for events
98 */
99export 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 })

Callers 15

matrixmarket.jsFile · 0.90
import.test.jsFile · 0.90
load.jsFile · 0.90
accessor.jsFile · 0.90
doc.test.jsFile · 0.90
csLu.test.jsFile · 0.90
csAmd.test.jsFile · 0.90

Calls 5

configFactoryFunction · 0.90
importFactoryFunction · 0.90
deepFlattenFunction · 0.90
importMethod · 0.80
forEachMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…