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 · Tarball · package.json
$ 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 8
This Week 8
This Month 120
Last Day 0
Last Week 79
Last Month 298
Dependencies (0)
None
Dev Dependencies (2)
Dependents (4)

Copyright 2013 - present © cnpmjs.org | Home |