0.2.13 • Published 3 years ago

@mdo-org/mdo-plugin-completed v0.2.13

Weekly downloads
1
License
SEE LICENSE IN .....
Repository
github
Last release
3 years ago

"Completed" Plugin

Adds a @completed timestamp to completed to-dos.

Installation

npm install --save @mdo-org/mdo-plugin-completed

Usage

const completed = require('@mdo-org/mdo-plugin-completed');

const time = "2019-04-01T00:00-05:00";
const timezone = "America/Panama";

mdoStream
  .pipe(completed.process({ time, timezone }))
  .pipe(completed.stringify({ time, timezone }))

Overview

Adds a .completed timestamp to any completed to-do.

  • completed.process() adds the timestamp in ISO-8601 format.
  • completed.stringify() converts the ISO-8601 timestamp into MDo's standard date format.

Eg:

given a stream that emits the following blocks

{ type: "INCOMPLETE_TASK", text: "{{type}} hello" }
{ type: "COMPLETE_TASK", text: "{{type}} world" }

after completed.process(), the stream will emit

{ type: "INCOMPLETE_TASK", text: "{{type}} hello" }
{ type: "COMPLETE_TASK", text: "{{type}} world", completed: '2019-01-20-17:34:00-05:00' }

after completed.stringify(), the stream will emit

{ type: "INCOMPLETE_TASK", text: "{{type}} hello" }
{ type: "COMPLETE_TASK", text: "{{type}} world", completed: '2019-01-20 at 5:34pm' }
0.2.13

3 years ago

0.2.12

5 years ago

0.2.11

5 years ago

0.2.10

5 years ago

0.2.9

5 years ago

0.2.8

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.3

5 years ago

0.2.1

5 years ago