UNPKG

epubavocado

Version:

I am an EPUB object model aspiring to be standards compliant.

23 lines (20 loc) 576 B
import type { EntityConstructor } from '../../mixins/entity.js' // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types export function I18n<TBase extends EntityConstructor>(Base: TBase) { return class I18n extends Base { dir() { return ( this._resolve('./@dir') || this._resolve('../@dir') || this._context._resolve('./@dir') ) } lang() { return ( this._resolve('./@xml:lang') || this._resolve('../@xml:lang') || this._context._resolve('./@xml:lang') ) } } }