All files localization.ts

87.5% Statements 7/8
75% Branches 3/4
100% Functions 2/2
87.5% Lines 7/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25      1x 1x 1x             1x         1x 2x 2x          
/**
 * Expose ltr and rtl strings
 */
export enum Direction {
    ltr = "ltr",
    rtl = "rtl"
}
 
export interface ILocaleDirectionMapping {
    [key: string]: Direction;
}
 
export const localeDirectionMapping: ILocaleDirectionMapping = {
    "en": Direction.ltr,
    "en-rtl": Direction.rtl
};
 
export default function isRTL(locale: string): boolean {
    Eif (localeDirectionMapping[locale]) {
        return localeDirectionMapping[locale] === Direction.rtl;
    }
 
    return false;
}