UNPKG

docutils-ts

Version:

Port of the Python Docutils library to TypeScript

12 lines (11 loc) 359 B
import Writer from '../writers/pojo.js'; function pojoTranslate(document) { const writer = new Writer({ logger: document.logger }); const output = writer.write(document, undefined); if (typeof output === 'undefined') { throw new Error('undefined output'); } return output; } export { pojoTranslate }; export default pojoTranslate;