# engine-typewriter

> Generate strings fragments from each string item of a array. This string is send through a event.

Latest version **0.0.2** (published 2020-02-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install engine-typewriter
pnpm add engine-typewriter
yarn add engine-typewriter
bun add engine-typewriter
```

## 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.0.2 |
| Published | 2020-02-13 |
| First published | 2020-02-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Darwin Stalin Vilcachagua Ayala |
| Maintainers | darwinva97 |
| Keywords | typewriter |

## Links

- npm: https://www.npmjs.com/package/engine-typewriter
- Repository: https://github.com/Darwin97VA/engine-typewriter
- Homepage: https://github.com/Darwin97VA/engine-typewriter#readme
- Issues: https://github.com/Darwin97VA/engine-typewriter/issues
- npm.io page: https://npm.io/package/engine-typewriter

## Recent versions

- 0.0.2 (latest) — 2020-02-13
- 0.0.1 — 2020-02-12
- 1.0.0 — 2020-02-12

## README

# engine-typewriter
Generador de maquina de escribir.

```markdown
> npm i engine-typewriter
```

### How to use:
#### Initialize:
It is initialized with an object of three properties of which one is optional.
```js
const config = {
    data: [
        'Lorem ipsum...',
        'Someone text',
        'Hello world!'
    ],
    frecuency: 200,
    // listeners: [callback1, callback2] (optional)
}
const typewriter = new TypeWriter(config)
```

#### Use:
```js
typewriter.add( fragment => {
    console.log(`Hi! Your current fragment is: ${fragment}.` )
})
typewriter.add([
    fragment => console.log(`It's execute each ${typewriter.frecuency} miliseconds.`),
    fragment => console.log("I'm someone callback.")
])
```
#### Results:
In this case, the following will be issued on the console:

```markdown
// 200 ms
Hi! Your current fragment is: L.
It's execute each 200 miliseconds.
I'm someone callback.

// 400 ms
Hi! Your current fragment is: Lo.
It's execute each 200 miliseconds.
I'm someone callback.

// ... 1800 ms
Hi! Your current fragment is: Lorem ipsu.
It's execute each 200 miliseconds.
I'm someone callback.
```

### Enviroment
It's works in Node JS and navigator side. This module works by issuing events using Node js EventEmmiter or a polyfill (it is very light) to simulate this in the browser.


### Fun and Happy Code!

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