You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
536 B

4 years ago
  1. # strip-eof [![Build Status](https://travis-ci.org/sindresorhus/strip-eof.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-eof)
  2. > Strip the [End-Of-File](https://en.wikipedia.org/wiki/End-of-file) (EOF) character from a string/buffer
  3. ## Install
  4. ```
  5. $ npm install --save strip-eof
  6. ```
  7. ## Usage
  8. ```js
  9. const stripEof = require('strip-eof');
  10. stripEof('foo\nbar\n\n');
  11. //=> 'foo\nbar\n'
  12. stripEof(new Buffer('foo\nbar\n\n')).toString();
  13. //=> 'foo\nbar\n'
  14. ```
  15. ## License
  16. MIT © [Sindre Sorhus](http://sindresorhus.com)