# @mdo-org/mdo-plugin-completed

> Adds a @completed timestamp to completed to-dos.

Latest version **0.2.13** (published 2021-05-22) · SEE LICENSE IN ../../LICENSE license · 0 weekly downloads

## Install

```sh
npm install @mdo-org/mdo-plugin-completed
pnpm add @mdo-org/mdo-plugin-completed
yarn add @mdo-org/mdo-plugin-completed
bun add @mdo-org/mdo-plugin-completed
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.13 |
| Published | 2021-05-22 |
| First published | 2019-04-02 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN ../../LICENSE |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 37.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alexis Hevia |
| Maintainers | alexishevia |

## Links

- npm: https://www.npmjs.com/package/@mdo-org/mdo-plugin-completed
- Repository: https://github.com/mdo-org/mdo
- Homepage: https://github.com/mdo-org/mdo#readme
- Issues: https://github.com/mdo-org/mdo/issues
- npm.io page: https://npm.io/package/@mdo-org/mdo-plugin-completed

## Dependencies (1)

- [@mdo-org/mdo-core](https://npm.io/package/@mdo-org/mdo-core.md) ^0.2.13

## Recent versions

- 0.2.13 (latest) — 2021-05-22
- 0.2.12 — 2019-07-16
- 0.2.11 — 2019-06-30
- 0.2.10 — 2019-06-21
- 0.2.9 — 2019-05-27
- 0.2.8 — 2019-05-27
- 0.2.7 — 2019-05-26
- 0.2.6 — 2019-05-26
- 0.2.5 — 2019-05-26
- 0.2.3 — 2019-04-04
- 0.2.1 — 2019-04-02

## README

# "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' }
```

---
_Source: https://npm.io/package/@mdo-org/mdo-plugin-completed · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
