game/js/registrationTraining/features/getTextForModal.js
2023-01-10 18:30:35 +02:00

15 lines
238 B
JavaScript

import { dataText } from '../text.js';
/**
* @param {string} key
* @returns {string}
*/
export const getTextForModal = (key) => {
if (!key) {
return '[Отсутвует value].';
}
return dataText[key] ?? `[${key}].`;
};