# stopwatch-stream

> A streaming human readable stopwatch

Latest version **0.1.2** (published 2017-05-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install stopwatch-stream
pnpm add stopwatch-stream
yarn add stopwatch-stream
bun add stopwatch-stream
```

## 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.1.2 |
| Published | 2017-05-08 |
| First published | 2017-05-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | webmech |

## Links

- npm: https://www.npmjs.com/package/stopwatch-stream
- Repository: https://github.com/web-mech/stopwatch-stream
- Homepage: https://github.com/web-mech/stopwatch-stream#readme
- Issues: https://github.com/web-mech/stopwatch-stream/issues
- npm.io page: https://npm.io/package/stopwatch-stream

## Dependencies (1)

- [rxjs](https://npm.io/package/rxjs.md) ^5.3.1

## Recent versions

- 0.1.2 (latest) — 2017-05-08
- 0.1.1 — 2017-05-08
- 0.1.0 — 2017-05-08

## README

# stopwatch-stream

A streaming human readable stopwatch. 

[![Build Status](https://travis-ci.org/web-mech/stopwatch-stream.svg?branch=master)](https://travis-ci.org/web-mech/stopwatch-stream)

Exposes an RxJS [Observable](http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html)

## Default Format

```
00:00:00
```

## Usage;

```
const stopWatch = require('stopwatch-stream');
const sw = stopWatch();
```

### Basic
```
sw.stream.subscribe((s) => {
	console.log(s); //00:00:00 ...
});
sw.start();
```

### Pausing

```
sw.stream.subscribe((s) => {
	console.log(s);
});

sw.start();

sw.stop();
```

### Current

```
sw.current(); // 00:00:00
```

### Cleanup

```
sw.stream.subscribe((s) => {
	console.log(s);
});

sw.start();

sw.stop();

sw.complete();
```

### Options

#### Stream on init

```
const sw = stopWatch({
	on: true
});

sw.stream.subscribe((s) => {
	console.log(s);
});

```

#### Stopwatch format

```
 const sw = stopWatch({
    format: '000',
    delimiter: '.'
  });
 sw.current(); // '00:00.000'

```

---
_Source: https://npm.io/package/stopwatch-stream · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
