1.1.1 • Published 5 years ago
@lggruspe/todo-txt-parser v1.1.1
todo-txt-parser
todo.txt parser for Typescript/Javascript.
Installation
npm install @lggruspe/todo-txt-parserUsage
import { parse } from '@lggruspe/todo-txt-parser'
import { readFileSync } from 'fs'
const todo = readFileSync('todo.txt', 'utf8').trim()
const tasks = parse(todo)Each Task contains the following fields.
interface Task {
completed?: boolean
priority?: string
completion?: string
creation?: string
description?: string
projects?: Array<string>
contexts?: Array<string>
pairs?: Array<[string, string]>
}See examples/.
License
MIT.