Skip to content

@technobuddha > library > String > Operations

Type Alias: WordwrapOptions

ts
type WordwrapOptions = {
  cut?: boolean;
  separator?: string;
  trailingSpaces?: boolean;
  width?: number;
};

Defined in: wordwrap.ts:9

Options for the wordwrap function

Properties

PropertyTypeDescriptionDefined in
cut?booleanIf true, don't limit breaks to word boundariessrc/wordwrap.ts:15
separator?stringLine separatorsrc/wordwrap.ts:13
trailingSpaces?booleanIf true, spaces are added to the end of each line to make all lines equal width, ignored if cut or preserveSpaces is truesrc/wordwrap.ts:17
width?numberThe width to wrap tosrc/wordwrap.ts:11