Skip to content

src/core/config.js ​

Save and load a fit set-up (parameter values, which are free, and their priors) as JSON or YAML. The YAML reader handles the subset this module writes: nested maps of scalars by indentation, comments, no lists or flow syntax.

Import: import { … } from './src/core/config.js' — no DOM, runs in Node and the browser.

configToObject ​

js
function configToObject(S, params)

Save and load a fit set-up (parameter values, which are free, and their priors) as JSON or YAML. The YAML reader handles the subset this module writes: nested maps of scalars by indentation, comments, no lists or flow syntax.

toYAML ​

js
function toYAML(obj, indent = 0)

No description in the source.

parseYAML ​

js
function parseYAML(text)

No description in the source.

parseConfig ​

js
function parseConfig(text)

Accepts JSON or YAML text. Returns the normalised object or throws a readable error.

MIT licensed · Kyle A. Pearson