UNPKG

leasot

Version:

Parse and output TODOs and FIXMEs from comments in your files

15 lines (14 loc) 352 B
import { report } from '../index.js'; export const outputTodos = async (todos, options) => { try { const output = await report(todos, options.reporter); console.log(output); } catch (e) { console.error(e); } if (options.exitNicely) { process.exit(0); } process.exit(todos.length ? 1 : 0); };