# trim-off-newlines

> Similar to String#trim() but removes only newlines

Latest version **1.0.3** (published 2021-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install trim-off-newlines
pnpm add trim-off-newlines
yarn add trim-off-newlines
bun add trim-off-newlines
```

## 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 | 2021-10-24 |
| First published | 2015-09-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Steve Mao |
| Maintainers | stevemao, trott |
| Keywords | trim, newlines, new-lines, newline, new-lines, string, str, util, utils, utility, whitespace, space, remove, delete |

## Links

- npm: https://www.npmjs.com/package/trim-off-newlines
- Repository: https://github.com/stevemao/trim-off-newlines
- Homepage: https://github.com/stevemao/trim-off-newlines#readme
- Issues: https://github.com/stevemao/trim-off-newlines/issues
- npm.io page: https://npm.io/package/trim-off-newlines

## Recent versions

- 1.0.3 (latest) — 2021-10-24
- 1.0.2 — 2021-09-17
- 1.0.1 — 2016-07-18
- 1.0.0 — 2015-09-18
- 0.0.0 — 2015-09-18

## README

# trim-off-newlines [![Build Status](https://travis-ci.org/stevemao/trim-off-newlines.svg?branch=master)](https://travis-ci.org/stevemao/trim-off-newlines)

> Similar to [`String#trim()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim) but removes only newlines


## Install

```
$ npm install --save trim-off-newlines
```


## Usage

```js
var trimOffNewlines = require('trim-off-newlines');

trimOffNewlines('\n\nunicorns\n\n');
//=> 'unicorns'
```


## Related

- [`trim-left`](https://github.com/sindresorhus/trim-left) - Similar to `String#trim()` but removes only whitespace on the left
- [`trim-right`](https://github.com/sindresorhus/trim-right) - Similar to `String#trim()` but removes only whitespace on the right


## License

MIT © [Steve Mao](https://github.com/stevemao)

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