https://github.com/noah227/justify
https://github.com/noah227/justify
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/noah227/justify
- Owner: noah227
- Created: 2025-03-13T02:59:40.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2025-03-13T03:16:42.000Z (2 months ago)
- Last Synced: 2025-03-13T04:21:15.970Z (2 months ago)
- Language: JavaScript
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# justify
> Python style string justify.
## install
```shell
npm i @cynario/justify
```## usage
```js
import {center, ljust, rjust} from "./index"
// import {justify} from "./index"
// justify.ljust
// ...const s = "hello"
console.log(ljust(s, 8, "*"))
console.log(rjust(s, 8, "*"))
console.log(center(s, 8, "*"))
console.log(center(s, 9, "*"))// hello***
// ***hello
// *hello**
// **hello**
```