https://github.com/tpkn/underlined-js
The module draws a string of characters of a certain length
https://github.com/tpkn/underlined-js
Last synced: 3 months ago
JSON representation
The module draws a string of characters of a certain length
- Host: GitHub
- URL: https://github.com/tpkn/underlined-js
- Owner: tpkn
- License: mit
- Created: 2020-07-06T17:11:28.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-06T17:35:15.000Z (almost 5 years ago)
- Last Synced: 2024-10-16T03:31:59.133Z (7 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Underlined [](https://www.npmjs.org/package/underlined)
The module draws a string of characters of a certain lengthMake sure you use a monospaced font!
## API
```javascript
Underlined(input[, options])
```### input
**Type**: _String_### options
**Type**: _Object_### options.symbol
**Type**: _String_
**Default**: `-`Underline character
### options.with_string
**Type**: _Boolean_
**Default**: `true`Do include input string into result
### options.top
**Type**: _Boolean_
**Default**: `false`Draw line at the top
### options.bottom
**Type**: _Boolean_
**Default**: `true`Draw line at the bottom
### options.eol
**Type**: _String_
**Default**: `\n`End of line character
## Usage
```javascript
Underlined('Lorem ipsum dolor sit amet, consectetur adipisicing elit');
``````
Lorem ipsum dolor sit amet, consectetur adipisicing elit
--------------------------------------------------------
``````javascript
Underlined('Lorem ipsum dolor sit amet, consectetur adipisicing elit', { top: true });
``````
--------------------------------------------------------
Lorem ipsum dolor sit amet, consectetur adipisicing elit
--------------------------------------------------------
``````javascript
Underlined('Lorem ipsum dolor sit amet, consectetur adipisicing elit', { symbol: '+', with_string: false });
``````
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
```