Skip to content

🏉 Left pad a string with rugby balls

License

Notifications You must be signed in to change notification settings

trashify/rugga-pad

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rugga-pad

Install

$ npm install --save rugga-pad

Usage

const ruggaPad = require('rugga-pad');

ruggaPad('ball', 6);
//=> '🏉🏉ball'

API

ruggaPad(input, length)

Pads input with rugby balls on the left side if it's shorter than length. Padding rugby balls are truncated if they exceed length.

input

Type: string

String to pad.

length

Type: number
Default: 0

Padding length.

License

Created with ♥ by Tiaan du Plessis. Licensed under the MIT License.

About

🏉 Left pad a string with rugby balls

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%