.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / trim-trailing-lines / readme.md
1 # trim-trailing-lines
2
3 [![Build][build-badge]][build]
4 [![Coverage][coverage-badge]][coverage]
5 [![Downloads][downloads-badge]][downloads]
6 [![Size][size-badge]][size]
7
8 Remove final line feeds from a string.
9
10 ## Install
11
12 [npm][]:
13
14 ```sh
15 npm install trim-trailing-lines
16 ```
17
18 ## Use
19
20 ```js
21 var trimTrailingLines = require('trim-trailing-lines')
22
23 trimTrailingLines('foo\nbar') // => 'foo\nbar'
24 trimTrailingLines('foo\nbar\n') // => 'foo\nbar'
25 trimTrailingLines('foo\nbar\n\n') // => 'foo\nbar'
26 ```
27
28 ## API
29
30 ### `trimTrailingLines(value)`
31
32 Remove final line feed characters from `value`.
33
34 ###### Parameters
35
36 *   `value` (`string`) — Value with trailing line feeds, coerced to string.
37
38 ###### Returns
39
40 `string` — Value without trailing newlines.
41
42 ## License
43
44 [MIT][license] © [Titus Wormer][author]
45
46 <!-- Definitions -->
47
48 [build-badge]: https://img.shields.io/travis/wooorm/trim-trailing-lines.svg
49
50 [build]: https://travis-ci.org/wooorm/trim-trailing-lines
51
52 [coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/trim-trailing-lines.svg
53
54 [coverage]: https://codecov.io/github/wooorm/trim-trailing-lines
55
56 [downloads-badge]: https://img.shields.io/npm/dm/trim-trailing-lines.svg
57
58 [downloads]: https://www.npmjs.com/package/trim-trailing-lines
59
60 [size-badge]: https://img.shields.io/bundlephobia/minzip/trim-trailing-lines.svg
61
62 [size]: https://bundlephobia.com/result?p=trim-trailing-lines
63
64 [npm]: https://docs.npmjs.com/cli/install
65
66 [license]: license
67
68 [author]: https://wooorm.com