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

lodash.pad

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.pad

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

  • 3.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
535K
decreased by-2.8%
Maintainers
3
Weekly downloads
 
Created

What is lodash.pad?

The lodash.pad package is a utility library that provides functions to pad strings on both sides to a specified length. It is part of the larger Lodash library, which is known for its utility functions for common programming tasks.

What are lodash.pad's main functionalities?

pad

Pads the string 'abc' on both sides with spaces until the total length is 8.

const _ = require('lodash.pad');
console.log(_.pad('abc', 8)); // '  abc   '

pad with custom characters

Pads the string 'abc' on both sides with the custom characters '_-' until the total length is 8.

const _ = require('lodash.pad');
console.log(_.pad('abc', 8, '_-')); // '_-abc_-_'

Other packages similar to lodash.pad

Keywords

FAQs

Package last updated on 26 Jan 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