An open API service indexing awesome lists of open source software.

https://github.com/artdecocode/paddys

Pad strings to equalise the length of each line.
https://github.com/artdecocode/paddys

Last synced: 10 months ago
JSON representation

Pad strings to equalise the length of each line.

Awesome Lists containing this project

README

          

# paddys

[![npm version](https://badge.fury.io/js/paddys.svg)](https://npmjs.org/package/paddys)

`paddys` is a package that pads strings so that each line is of the width of the longest line. It can also pad to a specific length.

```sh
yarn add -E paddys
```

## Table Of Contents

- [Table Of Contents](#table-of-contents)
- [API](#api)
- [`paddys(string: string, options?: Config): string`](#paddysstring-stringoptions-config-string)
* [`_paddys.Config`](#type-_paddysconfig)
- [Copyright](#copyright)

## API

The package is available by importing its default function:

```js
import paddys from 'paddys'
```

## `paddys(`
  `string: string,`
  `options?: Config,`
`): string`

Pads the string to the right to equalise the length of each line.

__`_paddys.Config`__: Options for the program.

| Name | Type | Description |
| ----- | --------------- | -------------------------------- |
| width | number | The width to which to pad lines. |

```js
/* yarn example/ */
import paddys from 'paddys'

const res = paddys(
`Just stop your wandering,
Look penetratingly into your inherent nature,
And, concentrating your spiritual energy,
Sit in zazen
And break through.`
)
```
```
Just stop your wandering,____________________
Look penetratingly into your inherent nature,
And, concentrating your spiritual energy,____
Sit in zazen_________________________________
And break through.___________________________
```

## Copyright




Art Deco


© Art Deco 2019


Tech Nation Visa


Tech Nation Visa Sucks