Pad Thai
Yum.
Install
Node.js
$ npm install pad-thai
Deno
import { padThai, padThaiStart, padThaiEnd } from 'https://github.com/giodamelio/pad-thai/raw/master/src/index.ts';
Usage
Node.js
import { padThai, padThaiStart, padThaiEnd } from 'pad-thai';
console.log(padThai(' Hello World ', 21)); // prints "thai Hello World thai"
console.log(padThaiStart(' Hello World', 16)); // prints "thai Hello World"
console.log(padThaiEnd('Hello World ', 16)); // prints "Hello World thai"
Deno
import { padThai, padThaiStart, padThaiEnd } from 'https://github.com/giodamelio/pad-thai/raw/master/src/index.ts';
console.log(padThai(' Hello World ', 21)); // prints "thai Hello World thai"
console.log(padThaiStart(' Hello World', 16)); // prints "thai Hello World"
console.log(padThaiEnd('Hello World ', 16)); // prints "Hello World thai"
Why?
I was hungry and bored one night.