sorenabedi/artist-svelte

View on GitHub
src/lib/utilities/hook/rtl/internal-component-rtl.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import { browser } from '$app/env';
import globalVars from '../../../env';

export default (rtlInput: boolean, rtlHookStatus: boolean): boolean => {
    /* istanbul ignore else */
    if (browser) {
        return rtlInput !== undefined ? rtlInput : rtlHookStatus;
    } else {
        return rtlInput !== undefined ? rtlInput : globalVars.RTL;
    }
};