Socket
Socket
Sign inDemoInstall

lodash.pad

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.pad

The modern build of lodash’s `_.pad` as a module.


Version published
Weekly downloads
547K
increased by1.83%
Maintainers
1
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 2015

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