# reduce-string

> reduce string with a ellipsis length

Latest version **0.0.6** (published 2017-08-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install reduce-string
pnpm add reduce-string
yarn add reduce-string
bun add reduce-string
```

## 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.6 |
| Published | 2017-08-13 |
| First published | 2017-08-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | standlee |

## Links

- npm: https://www.npmjs.com/package/reduce-string
- npm.io page: https://npm.io/package/reduce-string

## Recent versions

- 0.0.6 (latest) — 2017-08-13
- 0.0.5 — 2017-08-13
- 0.0.4 — 2017-08-13
- 0.0.3 — 2017-08-13
- 0.0.2 — 2017-08-13
- 0.0.1 — 2017-08-13

## README

```
import test from 'ava';
import func from '../index';

test(t => {
    t.is(func('with spaces '), 'with spaces');
    t.is(func('no spaces'), 'no');
    t.is(func('中文'), '中');
    t.is(func('!@#$%^&*()_+'), '!@#$%^&*()_');
    t.is(func('what1'), 'what');
    t.is(func('what-'), 'what');
    t.is(func('what文'), 'what');
    t.is(func('what'), '');
    t.is(func('www.baidu.com google.cn'), 'www.baidu.com');
    t.is(func('www.baidu.com '), 'www.baidu.com');
    t.is(func('www.baidu.com'), '');
});
```

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