# linespin

> Simple progress output

Latest version **0.2.0** (published 2014-07-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install linespin
pnpm add linespin
yarn add linespin
bun add linespin
```

## 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.0 |
| Published | 2014-07-09 |
| First published | 2014-01-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nicholas Hwang |
| Maintainers | geekjuice |

## Links

- npm: https://www.npmjs.com/package/linespin
- Repository: https://github.com/geekjuice/linespin
- Issues: https://github.com/geekjuice/linespin/issues
- npm.io page: https://npm.io/package/linespin

## Recent versions

- 0.2.0 (latest) — 2014-07-09
- 0.1.0 — 2014-07-09
- 0.0.4 — 2014-01-30
- 0.0.3 — 2014-01-29
- 0.0.2 — 2014-01-07
- 0.0.1 — 2014-01-06

## README

# linespin

Simple progress output

Extracted from [music.json](https://github.com/geekjuice/musicjson)


## Why?

It's nice to know that your program is running and not dead with a simple
spinner animation


## Usage

```sh
  $ npm install linespin
```

```javascript
  // linespin_example.js

  var Linespin = require('./linespin');

  // Create new instance of linespin
  var linespin = new Linespin('Spinning...', 'All done!', 100);

  // Start spinner at beginning of task
  linespin.start();


  // Some long running task...
  linespin.error('Error!');

  // Continuing process...
  linespin.warn('Warning!');

  // Say something...
  linespin.msg('Hello world!');

  // Results down the line...
  var results = 42;

  // Stop at the end of task and overwrite message with results
  linespin.stop('The answer is ' + results);
```


```sh
  $ node linespin_example.js
    [/] Spinning...

  # During process...

  $ node linespin_example.js
    [!] Error!          # Red
    [!] Warning!        # Yellow
    [•] Hello world!    # White
    [-] Spinning...     # Yellow/Blue

  # On finish

  $ node linespin_example.js
    [!] Error!            # Red
    [!] Warning!          # Yellow
    [•] Hello world!      # White
    [✓] The answer is 42  # Green/Blue
```


## Notes
* Assumes your progress does not print to console/stdout as the spinner works by
  replacing the same line over and over again to produce the _animation_
* Add editable color and symbol options
* Add replace text method to replace current text i.e. Progress done
* ~~Aggregate message output methods (wet code...)~~
* ~~Overwrite console.log or provide similar function i.e. @message~~
* ~~Need to add Gruntfile~~



## License
Linespin is released under the MIT License.

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