README
trim-lines
Remove spaces and tabs around line breaks.
Install
This package is ESM only: Node 12+ is needed to use it and it must be import
ed
instead of require
d.
npm:
npm install trim-lines
Use
import {trimLines} from 'trim-lines'
trimLines(' foo\t\n\n bar \n\tbaz ') // => ' foo\nbar\nbaz '
API
This package exports the following identifiers: trimLines
.
There is no default export.
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.