UNPKG

@catchphrase/core

Version:

Functional i18n library for the web

22 lines (21 loc) 664 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createCatchphrase = void 0; const createTranslation_1 = require("./createTranslation"); /** * Creates a new catchphrase instance * @returns */ const createCatchphrase = ({ languageSelector, }) => { return { /** * Creates a new translation */ createTranslation: (0, createTranslation_1.createTranslation)({ languageSelector }), /** * @returns the language for the catchphrase instance */ getLanguage: () => languageSelector(), }; }; exports.createCatchphrase = createCatchphrase;