todotxt-parse
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

todotxt-parse

Parse todo.txt strings easily.

Usage

// Install
// npm i todotxt-parse

const TodoTxt = require('todotxt-parse').default;

const txt = `x 2011-03-02 2011-03-01 Review Tim's pull request +TodoTxtTouch @github`;

const todo = new TodoTxt(txt);

console.log(todo.parse());
// Logs
// { origText: 'x 2011-03-02 2011-03-01 Review Tim\'s pull request +TodoTxtTouch @github',
//   text:
//    [ 'x',
//      '2011-03-02',
//      '2011-03-01',
//      'Review',
//      'Tim\'s',
//      'pull',
//      'request',
//      '+TodoTxtTouch',
//      '@github' ],
//   complete: true,
//   priority: null,
//   creationDate: '2011-03-01',
//   completionDate: '2011-03-02',
//   projects: [ '+TodoTxtTouch' ],
//   contexts: [ '@github' ] }

Readme

Keywords

Package Sidebar

Install

npm i todotxt-parse

Weekly Downloads

1

Version

0.2.0

License

MIT

Last publish

Collaborators

  • willyb321