Yet another simple StringBuilder
Useful if you want to log to a string instead of the console
Please consider following this project's author, SwiftWinds, and starring the project to show your ❤️ and support.
Install with npm:
$ npm install --save yassb
;const sb = ;sb;sb;console;//=> Hello, world!// commands can be chained like thissb;console;//=> Hello, world// This is another line!// So is this!// addLine() without parameters simply creates a new lineconsole;//=> Hello, world// This is another line!// So is this!//// This is so cool.const emptySb = ;console;//=> true false// there is no empty line at the beginning of the StringBuilderconst anotherSb = ;anotherSb;console;//=> This is the first (and last) line
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.