@intlayer/core
Version:
Includes core Intlayer functions like translation, dictionary, and utility functions shared across multiple packages.
26 lines (24 loc) • 613 B
JavaScript
import { NodeType, formatNodeType } from "@intlayer/types";
//#region src/transpiler/nesting/nesting.ts
/**
* Function intended to be used to build intlayer dictionaries.
*
* Allow to extract the content of another dictionary and nest it in the current dictionary.
*
* Usage:
*
* ```ts
* nest("dictionaryKey");
* nest("dictionaryKey", "path.to.content");
* ```
*
* The order of the keys will define the priority of the content.
*
*/
const nesting = (dictionaryKey, path) => formatNodeType(NodeType.Nested, {
dictionaryKey,
path
});
//#endregion
export { nesting as nest };
//# sourceMappingURL=nesting.mjs.map