UNPKG

@intlayer/core

Version:

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

24 lines (22 loc) 901 B
const require_interpreter_getContent_getContent = require('./getContent/getContent.cjs'); //#region src/interpreter/getDictionary.ts /** * Transforms a dictionary in a single pass, applying each plugin as needed. * * @param dictionary The dictionary to transform. * @param locale The locale to use if your transformers need it (e.g. for translations). * @param additionalPlugins An array of NodeTransformer that define how to transform recognized nodes. * If omitted, we’ll use a default set of plugins. */ const getDictionary = (dictionary, locale, plugins) => { const props = { dictionaryKey: dictionary.key, dictionaryPath: dictionary.filePath, keyPath: [], plugins }; return require_interpreter_getContent_getContent.getContent(dictionary.content, props, locale); }; //#endregion exports.getDictionary = getDictionary; //# sourceMappingURL=getDictionary.cjs.map