# count-lines

> Count the lines in a string, works with windows carriage returns or unix style newlines.

Latest version **0.1.2** (published 2014-07-14) · 0 weekly downloads

## Install

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

## 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.1.2 |
| Published | 2014-07-14 |
| First published | 2014-07-14 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | bin, break, breaks, carriage, char, character, count, crlf, delimited, delimiter, end, ending, eol, lf, line, line-break, line-endings, linebreak, linefeed, newline, newlines, nl, return, split, unix, windows |

## Links

- npm: https://www.npmjs.com/package/count-lines
- Repository: https://github.com/jonschlinkert/count-lines
- Issues: https://github.com/jonschlinkert/count-lines/issues
- npm.io page: https://npm.io/package/count-lines

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2014-07-14
- 0.1.0 — 2014-07-14

## README

# count-lines [![NPM version](https://badge.fury.io/js/count-lines.png)](http://badge.fury.io/js/count-lines)

> Count the lines in a string, works with windows carriage returns or unix style newlines.

## Install
#### [npm](npmjs.org)

```bash
npm i count-lines --save
```

## Usage

```js
var count = require('count-lines');
console.log(count('a\nb\nc'));
//=> '3'

console.log(count('a\r\nb\r\nc'));
//=> '3'
```

## Author

**Jon Schlinkert**
 
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) 

## License
Copyright (c) 2014 Jon Schlinkert, contributors.  
Released under the MIT license

***

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 13, 2014._

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