🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

trim-trailing-lines

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trim-trailing-lines

Remove final line feeds from a string

2.1.0
latest
Source
npm
Version published
Weekly downloads
3.7M
34.58%
Maintainers
1
Weekly downloads
 
Created

What is trim-trailing-lines?

The npm package 'trim-trailing-lines' is designed to remove trailing newline characters from a string. This is particularly useful in text processing where consistent formatting is required, or when preparing output for further processing that does not handle trailing newlines well.

What are trim-trailing-lines's main functionalities?

Trim trailing newlines

This feature allows you to remove all trailing newline characters from the end of a string. It is useful for cleaning up text data before saving or processing it further.

const trimTrailingLines = require('trim-trailing-lines');
const result = trimTrailingLines('Hello World\n\n');
console.log(result); // 'Hello World'

Other packages similar to trim-trailing-lines

Keywords

trim

FAQs

Package last updated on 14 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts