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

ConstructorModifiersDescription
(constructor)(options)Constructs a new instance of the NormalizeNewlinesTextRewriter class

Properties

PropertyModifiersTypeDescription
ensureNewlineAtEndreadonlybooleanIf true, then NormalizeNewlinesTextRewriter.close() will append a newline to the output if it ends with an incomplete line.
newlinereadonlystringThe specific character sequence that will be used when appending newlines.
newlineKindreadonlyNewlineKindSpecifies how newlines should be represented in the output stream.

Methods

MethodModifiersDescription
close(unknownState)
initialize()
process(unknownState, text)