# x-lines

> Crop your text to fit it into X lines

Latest version **1.0.1** (published 2018-06-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install x-lines
pnpm add x-lines
yarn add x-lines
bun add x-lines
```

## 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.1 |
| Published | 2018-06-29 |
| First published | 2018-06-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Anton Kosykh |
| Maintainers | kelin2025 |

## Links

- npm: https://www.npmjs.com/package/x-lines
- Repository: https://github.com/Kelin2025/x-lines
- npm.io page: https://npm.io/package/x-lines

## Dependencies (1)

- [resize-observer-polyfill](https://npm.io/package/resize-observer-polyfill.md) ^1.5.0

## Recent versions

- 1.0.1 (latest) — 2018-06-29
- 1.0.0 — 2018-06-29

## README

# x-lines

Crop your text to fit it into X lines.  
[**View demo**](https://codesandbox.io/s/1qv121465l)

## Installation

```bash
npm i x-lines   # or yarn add x-lines
```

## Usage

#### Vanilla

```js
import { initCropper } from "x-lines"

const el = document.getElementById("foobar")

initCropper({ el, lines: 2 })
```

#### Vue directive

```vue
<template>
  <div v-crop-lines="2">Hello world</div>
</template>

<script>
import { cropLinesDirective } from "x-lines/vue"

export default {
  directives: {
    cropLines: cropLinesDirective
  }
}
</script>
```

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