UNPKG

jarb-final-form

Version:
28 lines (27 loc) 615 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); let config = null; /** * Configures the Constraint libary. * * @param {Config} The new configuration */ function configureConstraint(c) { config = c; } exports.configureConstraint = configureConstraint; /** * Either returns the a Config or throws an error when the * config is not yet initialized. * * @returns The Config */ function getConfig() { if (config === null) { throw new Error('The constraint service is not initialized.'); } else { return config; } } exports.getConfig = getConfig;