UNPKG

@o3r/core

Version:
19 lines 609 B
/** * Pad number * @param val * @param digits */ export function padNumber(val, digits = 2) { const str = `${val}`; return '0'.repeat(Math.max(0, digits - str.length)) + str; } /** * Returns TRUE if bootstrap config environment is production FALSE otherwise * @param dataset * @returns TRUE if bootstrap config environment is production FALSE otherwise */ export function isProductionEnvironment(dataset) { const bootstrapConfig = dataset.bootstrapconfig && JSON.parse(dataset.bootstrapconfig); return bootstrapConfig?.environment === 'prod'; } //# sourceMappingURL=debug.helper.js.map