@intlayer/core
Version:
Includes core Intlayer functions like translation, dictionary, and utility functions shared across multiple packages.
9 lines • 337 B
JavaScript
const getCondition = (conditionContent, state) => {
const stateList = Object.keys(conditionContent);
const fallbackState = stateList[stateList.length - 1];
return conditionContent[`${state}`] ?? conditionContent["fallback"] ?? conditionContent[fallbackState];
};
export {
getCondition
};
//# sourceMappingURL=getCondition.mjs.map