game/js/registrationTraining/features/getTextForModal.js

15 lines
238 B
JavaScript
Raw Normal View History

2022-12-19 20:22:19 +00:00
import { dataText } from '../text.js';
/**
* @param {string} key
* @returns {string}
*/
export const getTextForModal = (key) => {
if (!key) {
2023-01-10 16:29:32 +00:00
return '[Отсутвует value].';
2022-12-19 20:22:19 +00:00
}
return dataText[key] ?? `[${key}].`;
};