# trim-leading-lines

> Trim leading lines from a string when they are 100% whitespace or empty.

Latest version **0.1.1** (published 2016-07-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install trim-leading-lines
pnpm add trim-leading-lines
yarn add trim-leading-lines
bun add trim-leading-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.1 |
| Published | 2016-07-15 |
| First published | 2016-07-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | leading, lines, trim |

## Links

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

## Dependencies (1)

- [is-whitespace](https://npm.io/package/is-whitespace.md) ^0.3.0

## Recent versions

- 0.1.1 (latest) — 2016-07-15
- 0.1.0 — 2016-07-14

## README

# trim-leading-lines [![NPM version](https://img.shields.io/npm/v/trim-leading-lines.svg?style=flat)](https://www.npmjs.com/package/trim-leading-lines) [![NPM downloads](https://img.shields.io/npm/dm/trim-leading-lines.svg?style=flat)](https://npmjs.org/package/trim-leading-lines) [![Build Status](https://img.shields.io/travis/jonschlinkert/trim-leading-lines.svg?style=flat)](https://travis-ci.org/jonschlinkert/trim-leading-lines)

Trim leading lines from a string when they are 100% whitespace or empty.

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install --save trim-leading-lines
```

## Usage

```js
var trimLeadingLines = require('trim-leading-lines');
```

**Example**

Given the following in `foo.txt`:

```
                  
                  
                  
                  
                    GNU AFFERO GENERAL PUBLIC LICENSE
                       Version 3, 19 November 2007
```

This:

```js
var str = fs.readFileSync('foo.txt', 'utf8');
console.log(trimLeadingLines(str));
```

Results in:

```
                    GNU AFFERO GENERAL PUBLIC LICENSE
                       Version 3, 19 November 2007
```

## About

### Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).

### Building docs

_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_

To generate the readme and API documentation with [verb](https://github.com/verbose/verb):

```sh
$ npm install -g verb verb-generate-readme && verb
```

### Running tests

Install dev dependencies:

```sh
$ npm install -d && npm test
```

### Author

**Jon Schlinkert**

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

### License

Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT license](https://github.com/jonschlinkert/trim-leading-lines/blob/master/LICENSE).

***

_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on July 14, 2016._

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