@ao-framework/writer
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published


Writer

The writer is a library that was created to assist in developing multi-line strings for such things as code generation, documentation and error handling with custom templates.

Installation

npm install @ao-framework/writer

Import

import Writer from "@ao-framework/writer";

Usage

import Writer from "@ao-framework/writer";

let str = new Writer()
    .align("left")
    .indent(2)
    .line("I should be right against edge.")
    .line("So should I.", () => {
        writer.line("I should be indented 2 spaces", () => {
            writer.line("I should be indented 4 spaces")
        })
    }).getString()

console.log(str)

Outputs

I should be right against edge.
So should I.
  I should be indented 2 spaces
    I should be indented 4 spaces

Readme

Keywords

none

Package Sidebar

Install

npm i @ao-framework/writer

Weekly Downloads

2

Version

0.0.1

License

MIT

Unpacked Size

34.4 kB

Total Files

66

Last publish

Collaborators

  • josh-josh-miller