Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

trim-lines

1.1.3 • Public • Published

trim-lines

Build Coverage Downloads Size

Remove spaces and tabs around line breaks.

Install

npm:

npm install trim-lines

Use

var trimLines = require('trim-lines')
 
trimLines(' foo\t\n\n bar \n\tbaz ') // => ' foo\nbar\nbaz '

API

trimLines(value)

Remove initial and final spaces and tabs at the line breaks in value (string). Does not trim initial and final spaces and tabs of the value itself. Returns the trimmed value.

License

MIT © Titus Wormer

Install

npm i trim-lines

DownloadsWeekly Downloads

762,090

Version

1.1.3

License

MIT

Unpacked Size

4.28 kB

Total Files

4

Last publish

Collaborators

  • avatar