strip-eof
Strip the End-Of-File (EOF) character from a string/buffer
Last updated 10 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm
$ cnpm install strip-eof 
SYNC missed versions from official npm registry.

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

Current Tags

  • 2.0.0                                ...           latest (7 years ago)

2 Versions

  • 2.0.0 [deprecated]           ...           7 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org