Add additional styles to a block of text
npm install textingsh
$ npm install --save texting
`
Usage
`js
const texting = require('texting');
texting(text, options);
`
API
------
$3
##### Params:
* text: Array. - An array of text lines
* opts: Object - _optional_ - An options object
| Option | type | Description | Default |
| ------ | ---- | ----------- | ------- |
| blockStart | string | A string to be inserted before the inputed text | "" |
| blockEnd | string | A string to be inserted after the inputed text | "" |
| lineStart | string | A string to be inserted before each inputed text line | "" |
| lineEnd | string | A string to be inserted after each inputed text line | "" |
| seperator | string | A string to be inserted as a seperator between text line | "" |
##### Returns:
string - A formatted text output after joining the text lines and the requested options
##### Example
`js
texting(["first sentence", "second sentence", "third sentence"], {
lineStart: "+",
blockEnd: "-----"
});
`
The result (a string) is going to be:
`
+first sentence
+second sentence
+third sentence
-----
`
$3
##### Params:
* comments: Array. - An array of comments
##### Returns:
string - A commented text output built from the comments
##### Example
`js
texting.comments(["first comment", "second comment"]);
`
The result (a string) is going to be:
`js
// first comment
// second comment
`
$3
##### Params:
* comments: Array. - An array of comments
##### Returns:
string - A multiline commented text output built from the comments
##### Example
`js
texting.multiComments(["first comment", "second comment", "third comment"]);
`
The result (a string) is going to be:
`js
/*
first comment
second comment
third comment
*/
`
$3
##### Params:
* comments: Array. - An array of comments
##### Returns:
string - JSDoc formatted comments output built from the comments
##### Example
`js
texting.jsdocComments(["@ param {string} str", "@ param {number} num", "@ return {string}"]);
`
The result (a string) is going to be:
`js
/**
* @ param {string} str
* @ param {number} num
* @ return {string}
*/
`
texting.list(listItems)
##### Params:
* listItems: Array. - An array of list items
##### Returns:
string - A formatted list output built from list items
##### Example
`js
texting.list(["milk", "bread", "potato", "cheese"]);
`
The result (a string) is going to be:
`
- milk
- bread
- potato
- cheese
``