This package has been deprecated

Author message:

Renamed to `strip-final-newline` to better represent its functionality.

strip-eof

2.0.0 • Public • Published

strip-eof Build Status

Strip the End-Of-File (EOF) character from a string/buffer

Install

$ npm install strip-eof

Usage

const stripEof = require('strip-eof');
 
stripEof('foo\nbar\n\n');
//=> 'foo\nbar\n'
 
stripEof(Buffer.from('foo\nbar\n\n')).toString();
//=> 'foo\nbar\n'

License

MIT © Sindre Sorhus

Package Sidebar

Install

npm i strip-eof

Weekly Downloads

14,176,224

Version

2.0.0

License

MIT

Unpacked Size

2.63 kB

Total Files

4

Last publish

Collaborators

  • sindresorhus