Something went wrong. Try again.
Bluesky app fork with some witchin' additions 馃挮
Something went wrong. Try again.
387 B 路 17 lines
TypeScript
at main
123456789101112131415161718import bidiFactory from 'bidi-js'
const bidi = bidiFactory()
/** * Checks the first strong directional character, matching HTML `dir="auto"`. */export function isRTLText(text: string) { for (const character of text) { const type = bidi.getBidiCharTypeName(character)
if (type === 'R' || type === 'AL') return true if (type === 'L') return false }
return false}