# next-text

> nextText is a small utility function to get the next letter from a partial string

Latest version **1.0.4** (published 2018-06-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install next-text
pnpm add next-text
yarn add next-text
bun add next-text
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2018-06-01 |
| First published | 2017-02-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Christian Fei |
| Maintainers | christian_fei |
| Keywords | utility, typewriter, string utility, utils |

## Links

- npm: https://www.npmjs.com/package/next-text
- Repository: https://github.com/christian-fei/next-text
- Homepage: https://github.com/christian-fei/next-text#readme
- Issues: https://github.com/christian-fei/next-text/issues
- npm.io page: https://npm.io/package/next-text

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2018-06-01
- 1.0.3 — 2017-03-05
- 1.0.2 — 2017-03-05
- 1.0.1 — 2017-03-04
- 1.0.0 — 2017-03-04
- 0.0.7 — 2017-03-04
- 0.0.6 — 2017-03-02
- 0.0.5 — 2017-02-25
- 0.0.4 — 2017-02-24
- 0.0.3 — 2017-02-19
- 0.0.2 — 2017-02-19
- 0.0.1 — 2017-02-19

## README

[![travis-build-status](https://travis-ci.org/christian-fei/next-text.svg?branch=master)](https://travis-ci.org/christian-fei/next-text)
[![npm-dependencies](https://img.shields.io/badge/dependencies-none-blue.svg?style=flat-square&colorB=44CC11)](package.json)
[![standard-js](https://img.shields.io/badge/coding%20style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com/)
[![npm-node-version](https://img.shields.io/badge/node-6%2B-blue.svg?style=flat-square)](https://nodejs.org/docs/v6.0.0/api)
[![npm-version](https://img.shields.io/npm/v/next-text.svg?style=flat-square&colorB=007EC6)](https://www.npmjs.com/package/next-text)
[![license](https://img.shields.io/npm/l/next-text.svg?style=flat-square&colorB=007EC6)](https://spdx.org/licenses/MIT)

nextText is a small utility function to get the next letter from a partial string.

# api

## `nextText`

`nextText` creates an [instance of nextText](#nexttextinstance).


### Params

#### `text : String` (*required*)

The complete string the module should iterate incrementally.

#### `options : Object` (*optional*)

You can override these options:

| Option name | Default value | Description                                                  |
|-------------|---------------|--------------------------------------------------------------|
| restart     | false         | Once the text has been iterated, restart from the beginning. |

<!-- |             |               |                                                              | -->


## `nextTextInstance`

The return value of calling `nextText(string[, options])`.

### Methods

#### `.toString`

Returns the current value of the instance.

#### `.next`

Returns the next instance, with the updated current value.


# usage

[See Tests](./test/index.js).


```
const nextText = require('next-text')
let text = nextText('This is a test')
console.log(text.toString()) // ''
text = text.next()
console.log(text) // 'T'
text = text.next()
console.log(text) // 'Th'
text = text.next()
console.log(text) // 'Thi'
text = text.next()
console.log(text) // 'This'
text = text.next()
console.log(text) // 'This '
text = text.next()
console.log(text) // 'This i'
text = text.next()
console.log(text) // 'This is'
// you get the point
```

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