New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
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
  • Socket score

Version published
Weekly downloads
2M
decreased by-6.03%
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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc