1 | function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
2 |
|
3 | import { DEFAULT_CONFIG } from '../core/config.js';
|
4 | import { MATRIX_OPTIONS, NUMBER_OPTIONS } from '../core/function/config.js';
|
5 |
|
6 | export var config = function config(options) {
|
7 | if (options) {
|
8 | throw new Error('The global config is readonly. \n' + 'Please create a mathjs instance if you want to change the default configuration. \n' + 'Example:\n' + '\n' + ' import { create, all } from \'mathjs\';\n' + ' const mathjs = create(all);\n' + ' mathjs.config({ number: \'BigNumber\' });\n');
|
9 | }
|
10 |
|
11 | return Object.freeze(DEFAULT_CONFIG);
|
12 | };
|
13 |
|
14 | _extends(config, DEFAULT_CONFIG, {
|
15 | MATRIX_OPTIONS,
|
16 | NUMBER_OPTIONS
|
17 | }); |
\ | No newline at end of file |