Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lodash.trim

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.trim

The lodash method `_.trim` exported as a module.

  • 4.5.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
153K
increased by3.95%
Maintainers
3
Weekly downloads
 
Created

What is lodash.trim?

The lodash.trim package is a utility library that provides a simple function to trim whitespace from the beginning and end of a string. It is part of the larger Lodash library, which is known for its utility functions for common programming tasks.

What are lodash.trim's main functionalities?

Trim whitespace from both ends of a string

This feature removes whitespace from both the beginning and the end of the input string.

const _ = require('lodash.trim');
const trimmedString = _.trim('  Hello World  ');
console.log(trimmedString); // 'Hello World'

Trim specific characters from both ends of a string

This feature allows you to specify characters to be trimmed from both ends of the input string.

const _ = require('lodash.trim');
const trimmedString = _.trim('-_-Hello World-_-', '_-');
console.log(trimmedString); // 'Hello World'

Other packages similar to lodash.trim

Keywords

FAQs

Package last updated on 13 Aug 2016

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