trim-lines
Remove spaces and tabs around line-breaks
Last updated 4 years ago by wooorm .
MIT · Repository · Bugs · Original npm
$ cnpm install trim-lines 
SYNC missed versions from official npm registry.

trim-lines

Build Coverage Downloads Size

Remove spaces and tabs around line breaks.

Install

This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required.

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.

License

MIT © Titus Wormer

Current Tags

  • 2.0.0                                ...           latest (4 years ago)

2 Versions

  • 2.0.0                                ...           4 years ago
  • 1.1.3                                ...           6 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 (9)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org