Last change
on this file since 6fe77af was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
536 bytes
|
Line | |
---|
1 | # strip-eof [![Build Status](https://travis-ci.org/sindresorhus/strip-eof.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-eof)
|
---|
2 |
|
---|
3 | > Strip the [End-Of-File](https://en.wikipedia.org/wiki/End-of-file) (EOF) character from a string/buffer
|
---|
4 |
|
---|
5 |
|
---|
6 | ## Install
|
---|
7 |
|
---|
8 | ```
|
---|
9 | $ npm install --save strip-eof
|
---|
10 | ```
|
---|
11 |
|
---|
12 |
|
---|
13 | ## Usage
|
---|
14 |
|
---|
15 | ```js
|
---|
16 | const stripEof = require('strip-eof');
|
---|
17 |
|
---|
18 | stripEof('foo\nbar\n\n');
|
---|
19 | //=> 'foo\nbar\n'
|
---|
20 |
|
---|
21 | stripEof(new Buffer('foo\nbar\n\n')).toString();
|
---|
22 | //=> 'foo\nbar\n'
|
---|
23 | ```
|
---|
24 |
|
---|
25 |
|
---|
26 | ## License
|
---|
27 |
|
---|
28 | MIT © [Sindre Sorhus](http://sindresorhus.com)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.