Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/terminal > NormalizeNewlinesTextRewriter

NormalizeNewlinesTextRewriter class

For use with TextRewriterTransform, this rewriter converts all newlines to a standard format.

Signature:

export declare class NormalizeNewlinesTextRewriter extends TextRewriter 

Extends: TextRewriter

Constructors

Constructor

Modifiers

Description

(constructor)(options)

Constructs a new instance of the NormalizeNewlinesTextRewriter class

Properties

Property

Modifiers

Type

Description

ensureNewlineAtEnd

readonly

boolean

If true, then NormalizeNewlinesTextRewriter.close() will append a newline to the output if it ends with an incomplete line.

newline

readonly

string

The specific character sequence that will be used when appending newlines.

newlineKind

readonly

NewlineKind

Specifies how newlines should be represented in the output stream.

Methods

Method

Modifiers

Description

close(unknownState)

initialize()

process(unknownState, text)