UNPKG

@gechiui/dom

Version:
16 lines (14 loc) 359 B
/** * Internal dependencies */ import getComputedStyle from './get-computed-style'; /** * Whether the element's text direction is right-to-left. * * @param {Element} element The element to check. * * @return {boolean} True if rtl, false if ltr. */ export default function isRTL( element ) { return getComputedStyle( element ).direction === 'rtl'; }