UNPKG

@intlayer/core

Version:

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

26 lines (24 loc) 687 B
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs'); let __intlayer_types = require("@intlayer/types"); //#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.formatNodeType)(__intlayer_types.NodeType.Condition, content); //#endregion exports.cond = condition; //# sourceMappingURL=condition.cjs.map