UNPKG

docutils-ts

Version:

Port of the Python Docutils library to TypeScript

16 lines (15 loc) 475 B
import Component from './component.js'; import Reader from './reader.js'; import * as standalone from './readers/standalone.js'; export class ReReader extends Reader { getTransforms() { return Component.prototype.getTransforms.call(this); } } export function getReaderClass(readerName) { if (readerName === 'standalone') { return standalone.default; } throw new Error(`Reader "${readerName}" not found.`); } export default getReaderClass;