Détail du package

strip-eof

sindresorhus52.7mMITobsolète2.0.0

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

Strip the final newline character from a string/buffer

strip, trim, remove, delete

readme

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