# text-ellipsis

> Cut a string if too long

Latest version **1.0.3** (published 2015-09-15) · MIT license · 0 weekly downloads

## Install

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

## 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.3 |
| Published | 2015-09-15 |
| First published | 2015-09-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Stéphane DEROSIAUX |
| Maintainers | chtefi |
| Keywords | text, ellipsis, string, overflow |

## Links

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

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 1.0.3 (latest) — 2015-09-15
- 1.0.2 — 2015-09-14
- 1.0.1 — 2015-09-14

## README

# text-ellipsis [![Build Status](https://travis-ci.org/chtefi/text-ellipsis.svg)](https://travis-ci.org/chtefi/text-ellipsis)
> Cut off a string if too long

## Why

You always want to cut long strings.

## Install

```shell
$ npm install --save text-ellipsis
```

## Usage

```js
var ellipsis = require('text-ellipsis');

var short = ellipsis('a very long text', 10);
console.log(short);
// "a very ..."

var short = ellipsis('a very long text', 10, { side: 'start' });
console.log(short);
// "...ng text"

var short = ellipsis('a very long text', 10, { ellipsis: ' END' });
console.log(short);
// "a very END"
```

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