frame-of-mind

1.1.0 • Public • Published

frame-of-mind

npm version

frame-of-mind adds a frame around strings.

yarn add -E frame-of-mind

Table Of Contents

API

The package is available by importing its default function:

import frameOfMind from 'frame-of-mind'

frameOfMind(
  string: string,
  options?: Config,
): string

This function will add a frame around strings with single or multiple lines.

Config: Options for the program.

Name Type Description Default
padding number The left and right padding. 1
import frameOfMind from 'frame-of-mind'

const res = frameOfMind(
  `There are thousands upon thousands of students
who have practised meditation and obtained its fruits.
Do not doubt its possibilities because of the simplicity of the method.
If you can not find the truth right where you are,
where else do you expect to find it?`
)
┌─────────────────────────────────────────────────────────────────────────┐
│ There are thousands upon thousands of students                          │
│ who have practised meditation and obtained its fruits.                  │
│ Do not doubt its possibilities because of the simplicity of the method. │
│ If you can not find the truth right where you are,                      │
│ where else do you expect to find it?                                    │
└─────────────────────────────────────────────────────────────────────────┘

Copyright

(c) Art Deco 2019

Package Sidebar

Install

npm i frame-of-mind@1.1.0

Version

1.1.0

License

MIT

Unpacked Size

7.38 kB

Total Files

9

Last publish

Collaborators

  • zvr