UNPKG

@ionic/core

Version:
19 lines (17 loc) 502 B
/*! * (C) Ionic http://ionicframework.com - MIT License */ /** * Returns `true` if the document or host element * has a `dir` set to `rtl`. The host value will always * take priority over the root document value. */ const isRTL = (hostEl) => { if (hostEl) { if (hostEl.dir !== '') { return hostEl.dir.toLowerCase() === 'rtl'; } } return (document === null || document === void 0 ? void 0 : document.dir.toLowerCase()) === 'rtl'; }; export { isRTL as i };