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.
 
 
 
 
 
 
Vse Mozhet Byt b4fea2a3d6 doc: add eslint-plugin-markdown 8 years ago
..
LICENSE doc: add eslint-plugin-markdown 8 years ago
index.js doc: add eslint-plugin-markdown 8 years ago
package.json doc: add eslint-plugin-markdown 8 years ago
readme.md doc: add eslint-plugin-markdown 8 years ago

readme.md

trim-trailing-lines Build Status Coverage Status

Remove final newline characters from a string.

Installation

npm:

npm install trim-trailing-lines

Usage

var trimTrailingLines = require('trim-trailing-lines');

trimTrailingLines('foo\nbar'); //=> 'foo\nbar'
trimTrailingLines('foo\nbar\n'); //=> 'foo\nbar'
trimTrailingLines('foo\nbar\n\n'); //=> 'foo\nbar'

API

trimTrailingLines(value)

Remove final newline characters from value.

Parameters
  • value (string) — Value with trailing newlines, coerced to string.
Returns

string — Value without trailing newlines.

License

MIT © Titus Wormer