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';
|
4 | import { MATRIX_OPTIONS, NUMBER_OPTIONS } from '../core/function/config';
|
5 |
|
6 | export var config =
|
7 |
|
8 | function config(options) {
|
9 | if (options) {
|
10 | 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');
|
11 | }
|
12 |
|
13 | return Object.freeze(DEFAULT_CONFIG);
|
14 | };
|
15 |
|
16 | _extends(config, DEFAULT_CONFIG, {
|
17 | MATRIX_OPTIONS: MATRIX_OPTIONS,
|
18 | NUMBER_OPTIONS: NUMBER_OPTIONS
|
19 | }); |
\ | No newline at end of file |