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](/pages/api/terminal.textrewriter)

Constructors

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

Properties

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

Methods

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