You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

lpad

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lpad

Left-pad each line in a string

3.0.0
latest
Source
npm
Version published
Weekly downloads
23K
-10.08%
Maintainers
1
Weekly downloads
 
Created
Source

lpad

Left-pad each line in a string

Install

$ npm install lpad

Usage

import leftPad from 'lpad';

const string = 'foo\nbar';
/*
foo
bar
*/

lpad(string, '    ');
/*
    foo
    bar
*/

API

lpad(string, padString)

Pads each line in a string with the supplied string.

string

Type: string

String that will be padded.

padString

Type: string

String that will be prepended to each line.

Keywords

pad

FAQs

Package last updated on 08 Apr 2021

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