Sha256: bee88252e17974d949e0dafa36a7b5e8e7cc9dc94d6e0eee2c7c11bafb2b478d

Contents?: true

Size: 1.21 KB

Versions: 20

Compression:

Stored size: 1.21 KB

Contents

/**
 * Wrap words to a specified length.
 */
export = wrap;

declare function wrap(str: string, options?: wrap.IOptions): string;

declare namespace wrap {
    export interface IOptions {

        /**
         * The width of the text before wrapping to a new line.
         * @default ´50´
         */
        width?: number;

        /**
         * The string to use at the beginning of each line.
         * @default ´  ´ (two spaces)
         */
        indent?: string;

        /**
         * The string to use at the end of each line.
         * @default ´\n´
         */
        newline?: string;

        /**
         * An escape function to run on each line after splitting them.
         * @default (str: string) => string;
         */
        escape?: (str: string) => string;

        /**
         * Trim trailing whitespace from the returned string.
         * This option is included since .trim() would also strip
         * the leading indentation from the first line.
         * @default true
         */
        trim?: boolean;

        /**
         * Break a word between any two letters when the word is longer
         * than the specified width.
         * @default false
         */
        cut?: boolean;
    }
}

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
appmap-0.72.2 ./node_modules/word-wrap/index.d.ts
appmap-0.72.1 ./node_modules/word-wrap/index.d.ts
appmap-0.72.0 ./node_modules/word-wrap/index.d.ts
appmap-0.71.0 ./node_modules/word-wrap/index.d.ts
appmap-0.70.2 ./node_modules/word-wrap/index.d.ts
appmap-0.70.1 ./node_modules/word-wrap/index.d.ts
appmap-0.70.0 ./node_modules/word-wrap/index.d.ts
appmap-0.69.0 ./node_modules/word-wrap/index.d.ts
appmap-0.68.2 ./node_modules/word-wrap/index.d.ts
appmap-0.68.1 ./node_modules/word-wrap/index.d.ts
appmap-0.68.0 ./node_modules/word-wrap/index.d.ts
appmap-0.67.1 ./node_modules/word-wrap/index.d.ts
appmap-0.67.0 ./node_modules/word-wrap/index.d.ts
appmap-0.66.2 ./node_modules/word-wrap/index.d.ts
appmap-0.66.1 ./node_modules/word-wrap/index.d.ts
appmap-0.66.0 ./node_modules/word-wrap/index.d.ts
appmap-0.65.1 ./node_modules/word-wrap/index.d.ts
appmap-0.65.0 ./node_modules/word-wrap/index.d.ts
appmap-0.64.0 ./node_modules/word-wrap/index.d.ts
appmap-0.63.0 ./node_modules/word-wrap/index.d.ts