markmv - v1.39.2
    Preparing search index...

    Class SizeBasedSplitStrategy

    Split strategy that divides content based on file size limits.

    Creates new files when the current section exceeds a specified size limit. This ensures that no generated file becomes too large, which is useful for performance or platform constraints.

    Size-based splitting

    const strategy = new SizeBasedSplitStrategy({
    maxSize: 50, // 50KB per file
    outputDir: './chunks/',
    filenamePattern: '{original}-part-{index}'
    });

    const result = await strategy.split(content, 'large-document.md');
    console.log(`Split into ${result.sections.length} files under 50KB each`);

    Hierarchy (View Summary)

    Index
    • Returns value unless it is nullish or the empty string, in which case fallback is used -- an empty string is treated as "no value supplied" rather than a meaningful value to preserve.

      Parameters

      • value: string | null | undefined
      • fallback: string

      Returns string

    • Returns value unless it is nullish or zero, in which case fallback is used -- zero is not a meaningful value for these options (header levels start at 1, size limits must be positive).

      Parameters

      • value: number | undefined
      • fallback: number

      Returns number