# newline-to-br

> Format newlines to tags

Latest version **1.0.0** (published 2014-10-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install newline-to-br
pnpm add newline-to-br
yarn add newline-to-br
bun add newline-to-br
```

## 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.0 |
| Published | 2014-10-19 |
| First published | 2014-10-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | yoshuawuyts |
| Keywords | newlines, responsive, br |

## Links

- npm: https://www.npmjs.com/package/newline-to-br
- Repository: https://github.com/yoshuawuyts/newline-to-br
- Issues: https://github.com/yoshuawuyts/newline-to-br/issues
- npm.io page: https://npm.io/package/newline-to-br

## Alternatives

- [@snazzah/davey](https://npm.io/package/@snazzah/davey.md) — 1.5M weekly downloads
- [@vendure/testing](https://npm.io/package/@vendure/testing.md) — 8.3K weekly downloads
- [vue-simple-context-menu](https://npm.io/package/vue-simple-context-menu.md) — 6.6K weekly downloads
- [cypress-webpack-preprocessor-v5](https://npm.io/package/cypress-webpack-preprocessor-v5.md) — 2.1K weekly downloads
- [@backstage/plugin-catalog-backend-module-puppetdb](https://npm.io/package/@backstage/plugin-catalog-backend-module-puppetdb.md) — 1.3K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2014-10-19

## README

# newline-to-br
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Downloads][downloads-image]][downloads-url]

Format newlines to `<br>` tags. Supports linux, osx and windows newlines.

## Installation
```bash
npm install newline-to-br
```

## Usage
```js
var toBr = require('newline-to-br');

toBr('This page cannot be displayed because \n your computer is currently offline');

// => 'This page cannot be displayed because <br> computer is currently offline'
```

```css
br {
   display: block;
   margin: 0;
   padding: 0;
   border: none;
   content: " ";
}

@media only screen and (max-width: 475px) {
   br { display: none; }
}
```

## Why?
Because by changing our newlines to `<br>` tags we can add custom styling which
gives us finer-grained control over our text.

## See also
- [breaking-text by max savin][br-t]

## License
[MIT](https://tldrlegal.com/license/mit-license)

[npm-image]: https://img.shields.io/npm/v/newline-to-br.svg?style=flat-square
[npm-url]: https://npmjs.org/package/newline-to-br
[travis-image]: https://img.shields.io/travis/yoshuawuyts/newline-to-br.svg?style=flat-square
[travis-url]: https://travis-ci.org/yoshuawuyts/newline-to-br
[coveralls-image]: https://img.shields.io/coveralls/yoshuawuyts/newline-to-br.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/yoshuawuyts/newline-to-br?branch=master
[downloads-image]: http://img.shields.io/npm/dm/newline-to-br.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/newline-to-br

[br-t]: http://maxsavin.com/posts/breaking-text.php

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