Socket
Socket
Sign inDemoInstall

trim-off-newlines

Package Overview
Dependencies
0
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    trim-off-newlines

Similar to String#trim() but removes only newlines


Version published
Weekly downloads
378K
increased by4.18%
Maintainers
2
Install size
4.02 kB
Created
Weekly downloads
 

Readme

Source

trim-off-newlines Build Status

Similar to String#trim() but removes only newlines

Install

$ npm install --save trim-off-newlines

Usage

var trimOffNewlines = require('trim-off-newlines');

trimOffNewlines('\n\nunicorns\n\n');
//=> 'unicorns'
  • trim-left - Similar to String#trim() but removes only whitespace on the left
  • trim-right - Similar to String#trim() but removes only whitespace on the right

License

MIT © Steve Mao

Keywords

FAQs

Last updated on 24 Oct 2021

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc