1.1.1 • Published 4 years ago

@lggruspe/todo-txt-parser v1.1.1

Weekly downloads
88
License
MIT
Repository
github
Last release
4 years ago

todo-txt-parser

GitHub Workflow Status codecov npm (scoped) GitHub

todo.txt parser for Typescript/Javascript.

Installation

npm install @lggruspe/todo-txt-parser

Usage

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.

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago