Class: Convertor

Convertor

new Convertor(bufOrStr, startTag, endTag, prepend, append, encopt)

Parameters:
Name Type Attributes Default Description
bufOrStr string | Buffer
startTag string | Regex
endTag string | Regex
prepend String | Buffer add extra lines before converted tree content.
append String | Buffer add extra lines after converted tree content.
enc Object <optional>
UTF-8 encoding.
Source:

Methods

convert() → {Convertor}

process all AsciiTree in buffer.
Source:
Returns:
- return this.
Type
Convertor

toBuffer() → {Buffer}

Source:
Returns:
- whole buffer with asciitree converted.
Type
Buffer

toBufferArray() → {Array.<Buffer>}

Source:
Returns:
- flatted array of Buffer.
Type
Array.<Buffer>

toString() → {string}

return whole string as result.
Source:
Returns:
- return whole converted string.
Type
string

toStringArray() → {Array.<string>}

Source:
Returns:
- array of string.
Type
Array.<string>