UNPKG

@intlayer/core

Version:

Includes core Intlayer functions like translation, dictionary, and utility functions shared across multiple packages.

27 lines (25 loc) 776 B
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const require_runtime = require('../../_virtual/_rolldown/runtime.cjs'); let _intlayer_types_nodeType = require("@intlayer/types/nodeType"); //#region src/transpiler/condition/condition.ts /** * Function intended to be used to build intlayer dictionaries. * * Allow to pick a content based on a condition. * * Usage: * * ```ts * cond({ * 'true': 'The condition is validated', * 'false': 'The condition is not validated', * }); * ``` * * The last key provided will be used as the fallback value. * */ const condition = (content) => (0, _intlayer_types_nodeType.formatNodeType)(_intlayer_types_nodeType.CONDITION, content); //#endregion exports.cond = condition; //# sourceMappingURL=condition.cjs.map