KC's Workspace
    Preparing search index...

    Hierarchy (View Summary)

    Index
    • get filename(): string | null

      Returns string | null

    • get ignoreList(): boolean

      Returns boolean

    • get indentExclusionRanges(): number[] | number[][] | null

      Returns number[] | number[][] | null

    • get offset(): number

      Returns number

    • set offset(offset: number): void

      Parameters

      • offset: number

      Returns void

    • get original(): string

      Returns string

    • Parameters

      • content: string

      Returns this

    • Parameters

      • index: number
      • content: string

      Returns this

    • Parameters

      • index: number
      • content: string

      Returns this

    • Returns the guessed indentation string, or \t if none is found.

      Returns string

    • Returns boolean

    • Parameters

      Returns this

    • Deprecated method that throws an error directing users to use prependRight or appendLeft. This matches the original magic-string API which deprecated this method.

      Parameters

      • index: number
      • content: string

      Returns void

    • Returns boolean

    • Returns the last character of the generated string, or an empty string if empty.

      Returns string

    • Returns the content after the last newline in the generated string.

      Returns string

    • Returns number

    • Alias for relocate to match the original magic-string API. Moves the characters from start to end to index. Returns this for method chaining.

      Parameters

      • start: number
      • end: number
      • index: number

      Returns this

    • Parameters

      Returns this

    • Parameters

      • content: string

      Returns this

    • Parameters

      • index: number
      • content: string

      Returns this

    • Parameters

      • index: number
      • content: string

      Returns this

    • Parameters

      • start: number
      • end: number
      • to: number

      Returns this

    • Parameters

      • start: number
      • end: number

      Returns this

    • Parameters

      • from: string
      • to: string

      Returns this

    • Parameters

      • from: string
      • to: string

      Returns this

    • Returns the UTF-16 offset past the last match, or -1 if no match was found. The JS wrapper uses this to update lastIndex on the caller's RegExp. Global/sticky behavior is derived from the regex's own flags.

      Parameters

      Returns number

    • Resets the portion of the string from start to end to its original content. This undoes any modifications made to that range. Supports negative indices (counting from the end).

      Parameters

      • start: number
      • end: number

      Returns this

    • Returns the content between the specified UTF-16 code unit positions (JS string indices). Supports negative indices (counting from the end).

      When an index falls in the middle of a surrogate pair, the lone surrogate is included in the result (matching the original magic-string / JS behavior). This is done by returning a UTF-16 encoded JS string via napi_create_string_utf16.

      Parameters

      • Optionalstart: number | null
      • Optionalend: number | null

      Returns string

    • Returns a clone with content outside the specified range removed.

      Parameters

      • start: number
      • end: number

      Returns BindingMagicString

    • Returns string

    • Trims whitespace or specified characters from the start and end.

      Parameters

      • OptionalcharType: string | null

      Returns this

    • Trims whitespace or specified characters from the end.

      Parameters

      • OptionalcharType: string | null

      Returns this

    • Trims newlines from the start and end.

      Returns this

    • Trims whitespace or specified characters from the start.

      Parameters

      • OptionalcharType: string | null

      Returns this

    • Parameters

      Returns this