# crlf

> detect and change newline endings

Latest version **1.1.1** (published 2017-07-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install crlf
pnpm add crlf
yarn add crlf
bun add crlf
```

Provides the command `crlf`.

## 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.1.1 |
| Published | 2017-07-18 |
| First published | 2015-05-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23 |
| Author | Moshe Kolodny |
| Maintainers | kolodny |

## Links

- npm: https://www.npmjs.com/package/crlf
- Repository: https://github.com/kolodny/crlf
- Homepage: https://github.com/kolodny/crlf#readme
- Issues: https://github.com/kolodny/crlf/issues
- npm.io page: https://npm.io/package/crlf

## Dependencies (2)

- [glub](https://npm.io/package/glub.md) ^1.0.0
- [transform-file](https://npm.io/package/transform-file.md) ^1.0.1

## Recent versions

- 1.1.1 (latest) — 2017-07-18
- 1.1.0 — 2015-05-19
- 1.0.2 — 2015-05-19
- 1.0.1 — 2015-05-10
- 1.0.0 — 2015-05-10

## README

crlf
===

[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Downloads][downloads-image]][downloads-url]

Detect and change line endings

#### Usage

The cli is probably the one you're looking for, first `npm install -g crlf`.
Usage is something like this:

```bash
$ crlf index.js
index.js CRLF
$ crlf *.js
index.js CRLF
test.js LF
$ crlf --set=LF *.js
index.js CRLF -> LF
test.js LF -> LF
$ crlf index.js
LF
```

Here's the API usage

```js
var crlf = require('crlf');

crlf.get(__dirname + '/package.json', null, function(err, endingType) {
  console.log(endingType); // LF
});
crlf.set(__dirname + '/package.json', 'CRLF', function(err, endingType) {
  console.log(endingType); // LF
  // file was using LF and now uses CRLF
});
```


[npm-image]: https://img.shields.io/npm/v/crlf.svg?style=flat-square
[npm-url]: https://npmjs.org/package/crlf
[travis-image]: https://img.shields.io/travis/kolodny/crlf.svg?style=flat-square
[travis-url]: https://travis-ci.org/kolodny/crlf
[coveralls-image]: https://img.shields.io/coveralls/kolodny/crlf.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/kolodny/crlf
[downloads-image]: http://img.shields.io/npm/dm/crlf.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/crlf
[gitter-image]: https://badges.gitter.im/Join%20Chat.svg
[gitter-url]: https://gitter.im/kolodny/crlf?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

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