Documentation
    Preparing search index...

    Interface TwingOutputBuffer

    interface TwingOutputBuffer {
        outputStream: Writable & { pipe(writable: Writable): void };
        clean(): boolean;
        echo(string: any): string | void;
        endAndClean(): boolean;
        endAndFlush(): boolean;
        flush(): boolean;
        getAndClean(): string;
        getAndFlush(): string;
        getContents(): string;
        getLevel(): number;
        start(): boolean;
    }
    Index

    Properties

    outputStream: Writable & { pipe(writable: Writable): void }

    Methods

    • Clean (erase) the output buffer

      In human terms: empties the top-most buffer

      ┌─────────┐ ┌─────────┐ │ oof │ │ │ ├─────────┤ ├─────────┤ │ bar │ => │ bar │ ├─────────┤ ├─────────┤ │ foo │ │ foo │ => true └─────────┘ └─────────┘

      Returns boolean

    • Clean the output buffer, and delete active output buffer

      In human terms: removes the top-most buffer

      ┌─────────┐
      │   oof   │
      ├─────────┤    ┌─────────┐
      │   bar   │ -> │   bar   │
      ├─────────┤    ├─────────┤
      │   foo   │    │   foo   │ => true
      └─────────┘    └─────────┘
      

      Returns boolean

    • Flush (send) the output buffer, and delete current output buffer

      In human terms: appends the top-most buffer to the second-top-most buffer and removes the top-most buffer

      ┌─────────┐
      │   oof   │
      ├─────────┤    ┌─────────┐
      │   bar   │ -> │  baroof │
      ├─────────┤    ├─────────┤
      │   foo   │    │   foo   │ => true
      └─────────┘    └─────────┘
      

      Returns boolean

    • Flush (send) contents of the output buffer. The last buffer content is sent to next buffer

      In human terms: appends the top-most buffer to the second-top-most buffer and empties the top-most buffer

      ┌─────────┐    ┌─────────┐
      │   oof   │    │         │
      ├─────────┤    ├─────────┤
      │   bar   │ => │  baroof │
      ├─────────┤    ├─────────┤
      │   foo   │    │   foo   │ => true
      └─────────┘    └─────────┘
      

      Returns boolean

    • Get active buffer contents and delete active output buffer

      In human terms: removes the top-most buffer and returns its content

      ┌─────────┐
      │   oof   │
      ├─────────┤    ┌─────────┐
      │   bar   │ -> │   bar   │
      ├─────────┤    ├─────────┤
      │   foo   │    │   foo   │ => "oof"
      └─────────┘    └─────────┘
      

      Returns string

    • Get active buffer contents, flush (send) the output buffer, and delete active output buffer

      In human terms: appends the top-most buffer to the second-top-most buffer, removes the top-most buffer and returns its content

      ┌─────────┐
      │   oof   │
      ├─────────┤    ┌─────────┐
      │   bar   │ -> │  baroof │
      ├─────────┤    ├─────────┤
      │   foo   │    │   foo   │ => oof
      └─────────┘    └─────────┘
      

      Returns string

    • Gets the contents of the output buffer without clearing it.

      In human terms: returns the content of the top-most buffer

      ┌─────────┐
      │   oof   │
      ├─────────┤
      │   bar   │
      ├─────────┤
      │   foo   │ => "oof"
      └─────────┘
      

      Returns string