Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MagicString

Hierarchy

  • MagicString

Index

Constructors

constructor

  • new MagicString(str: string, options?: MagicStringOptions): MagicString
  • new MagicString(str: string, options?: MagicStringOptions): MagicString
  • new MagicString(str: string, options?: MagicStringOptions): MagicString
  • new MagicString(str: string, options?: MagicStringOptions): MagicString
  • new MagicString(str: string, options?: MagicStringOptions): MagicString
  • new MagicString(str: string, options?: MagicStringOptions): MagicString
  • new MagicString(str: string, options?: MagicStringOptions): MagicString
  • Parameters

    Returns MagicString

  • Parameters

    • str: string
    • Optional options: MagicStringOptions

    Returns MagicString

  • Parameters

    • str: string
    • Optional options: MagicStringOptions

    Returns MagicString

  • Parameters

    • str: string
    • Optional options: MagicStringOptions

    Returns MagicString

  • Parameters

    • str: string
    • Optional options: MagicStringOptions

    Returns MagicString

  • Parameters

    • str: string
    • Optional options: MagicStringOptions

    Returns MagicString

  • Parameters

    • str: string
    • Optional options: MagicStringOptions

    Returns MagicString

Properties

indentExclusionRanges

indentExclusionRanges: ExclusionRange | Array<ExclusionRange>

original

original: string

Methods

addSourcemapLocation

  • addSourcemapLocation(char: number): void
  • addSourcemapLocation(char: number): void
  • addSourcemapLocation(char: number): void
  • addSourcemapLocation(char: number): void
  • addSourcemapLocation(char: number): void
  • addSourcemapLocation(char: number): void
  • addSourcemapLocation(char: number): void
  • Parameters

    • char: number

    Returns void

  • Parameters

    • char: number

    Returns void

  • Parameters

    • char: number

    Returns void

  • Parameters

    • char: number

    Returns void

  • Parameters

    • char: number

    Returns void

  • Parameters

    • char: number

    Returns void

  • Parameters

    • char: number

    Returns void

append

  • append(content: string): MagicString
  • append(content: string): MagicString
  • append(content: string): MagicString
  • append(content: string): MagicString
  • append(content: string): MagicString
  • append(content: string): MagicString
  • append(content: string): MagicString
  • Parameters

    • content: string

    Returns MagicString

  • Parameters

    • content: string

    Returns MagicString

  • Parameters

    • content: string

    Returns MagicString

  • Parameters

    • content: string

    Returns MagicString

  • Parameters

    • content: string

    Returns MagicString

  • Parameters

    • content: string

    Returns MagicString

  • Parameters

    • content: string

    Returns MagicString

appendLeft

  • appendLeft(index: number, content: string): MagicString
  • appendLeft(index: number, content: string): MagicString
  • appendLeft(index: number, content: string): MagicString
  • appendLeft(index: number, content: string): MagicString
  • appendLeft(index: number, content: string): MagicString
  • appendLeft(index: number, content: string): MagicString
  • appendLeft(index: number, content: string): MagicString
  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

appendRight

  • appendRight(index: number, content: string): MagicString
  • appendRight(index: number, content: string): MagicString
  • appendRight(index: number, content: string): MagicString
  • appendRight(index: number, content: string): MagicString
  • appendRight(index: number, content: string): MagicString
  • appendRight(index: number, content: string): MagicString
  • appendRight(index: number, content: string): MagicString
  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

clone

  • clone(): MagicString
  • clone(): MagicString
  • clone(): MagicString
  • clone(): MagicString
  • clone(): MagicString
  • clone(): MagicString
  • clone(): MagicString
  • Returns MagicString

  • Returns MagicString

  • Returns MagicString

  • Returns MagicString

  • Returns MagicString

  • Returns MagicString

  • Returns MagicString

generateDecodedMap

  • generateDecodedMap(options?: Partial<SourceMapOptions>): DecodedSourceMap
  • generateDecodedMap(options?: Partial<SourceMapOptions>): DecodedSourceMap
  • generateDecodedMap(options?: Partial<SourceMapOptions>): DecodedSourceMap
  • generateDecodedMap(options?: Partial<SourceMapOptions>): DecodedSourceMap
  • generateDecodedMap(options?: Partial<SourceMapOptions>): DecodedSourceMap
  • generateDecodedMap(options?: Partial<SourceMapOptions>): DecodedSourceMap
  • generateDecodedMap(options?: Partial<SourceMapOptions>): DecodedSourceMap
  • Parameters

    Returns DecodedSourceMap

  • Parameters

    • Optional options: Partial<SourceMapOptions>

    Returns DecodedSourceMap

  • Parameters

    • Optional options: Partial<SourceMapOptions>

    Returns DecodedSourceMap

  • Parameters

    • Optional options: Partial<SourceMapOptions>

    Returns DecodedSourceMap

  • Parameters

    • Optional options: Partial<SourceMapOptions>

    Returns DecodedSourceMap

  • Parameters

    • Optional options: Partial<SourceMapOptions>

    Returns DecodedSourceMap

  • Parameters

    • Optional options: Partial<SourceMapOptions>

    Returns DecodedSourceMap

generateMap

  • generateMap(options?: Partial<SourceMapOptions>): SourceMap
  • generateMap(options?: Partial<SourceMapOptions>): SourceMap
  • generateMap(options?: Partial<SourceMapOptions>): SourceMap
  • generateMap(options?: Partial<SourceMapOptions>): SourceMap
  • generateMap(options?: Partial<SourceMapOptions>): SourceMap
  • generateMap(options?: Partial<SourceMapOptions>): SourceMap
  • generateMap(options?: Partial<SourceMapOptions>): SourceMap
  • Parameters

    Returns SourceMap

  • Parameters

    • Optional options: Partial<SourceMapOptions>

    Returns SourceMap

  • Parameters

    • Optional options: Partial<SourceMapOptions>

    Returns SourceMap

  • Parameters

    • Optional options: Partial<SourceMapOptions>

    Returns SourceMap

  • Parameters

    • Optional options: Partial<SourceMapOptions>

    Returns SourceMap

  • Parameters

    • Optional options: Partial<SourceMapOptions>

    Returns SourceMap

  • Parameters

    • Optional options: Partial<SourceMapOptions>

    Returns SourceMap

getIndentString

  • getIndentString(): string
  • getIndentString(): string
  • getIndentString(): string
  • getIndentString(): string
  • getIndentString(): string
  • getIndentString(): string
  • getIndentString(): string
  • Returns string

  • Returns string

  • Returns string

  • Returns string

  • Returns string

  • Returns string

  • Returns string

indent

  • indent(options?: IndentOptions): MagicString
  • indent(indentStr?: string, options?: IndentOptions): MagicString
  • indent(options?: IndentOptions): MagicString
  • indent(indentStr?: string, options?: IndentOptions): MagicString
  • indent(options?: IndentOptions): MagicString
  • indent(indentStr?: string, options?: IndentOptions): MagicString
  • indent(options?: IndentOptions): MagicString
  • indent(indentStr?: string, options?: IndentOptions): MagicString
  • indent(options?: IndentOptions): MagicString
  • indent(indentStr?: string, options?: IndentOptions): MagicString
  • indent(options?: IndentOptions): MagicString
  • indent(indentStr?: string, options?: IndentOptions): MagicString
  • indent(options?: IndentOptions): MagicString
  • indent(indentStr?: string, options?: IndentOptions): MagicString
  • Parameters

    Returns MagicString

  • Parameters

    Returns MagicString

  • Parameters

    • Optional options: IndentOptions

    Returns MagicString

  • Parameters

    • Optional indentStr: string
    • Optional options: IndentOptions

    Returns MagicString

  • Parameters

    • Optional options: IndentOptions

    Returns MagicString

  • Parameters

    • Optional indentStr: string
    • Optional options: IndentOptions

    Returns MagicString

  • Parameters

    • Optional options: IndentOptions

    Returns MagicString

  • Parameters

    • Optional indentStr: string
    • Optional options: IndentOptions

    Returns MagicString

  • Parameters

    • Optional options: IndentOptions

    Returns MagicString

  • Parameters

    • Optional indentStr: string
    • Optional options: IndentOptions

    Returns MagicString

  • Parameters

    • Optional options: IndentOptions

    Returns MagicString

  • Parameters

    • Optional indentStr: string
    • Optional options: IndentOptions

    Returns MagicString

  • Parameters

    • Optional options: IndentOptions

    Returns MagicString

  • Parameters

    • Optional indentStr: string
    • Optional options: IndentOptions

    Returns MagicString

isEmpty

  • isEmpty(): boolean
  • isEmpty(): boolean
  • isEmpty(): boolean
  • isEmpty(): boolean
  • isEmpty(): boolean
  • isEmpty(): boolean
  • isEmpty(): boolean
  • Returns boolean

  • Returns boolean

  • Returns boolean

  • Returns boolean

  • Returns boolean

  • Returns boolean

  • Returns boolean

lastChar

  • lastChar(): string
  • lastChar(): string
  • lastChar(): string
  • lastChar(): string
  • lastChar(): string
  • lastChar(): string
  • lastChar(): string
  • Returns string

  • Returns string

  • Returns string

  • Returns string

  • Returns string

  • Returns string

  • Returns string

lastLine

  • lastLine(): string
  • lastLine(): string
  • lastLine(): string
  • lastLine(): string
  • lastLine(): string
  • lastLine(): string
  • lastLine(): string
  • Returns string

  • Returns string

  • Returns string

  • Returns string

  • Returns string

  • Returns string

  • Returns string

length

  • length(): number
  • length(): number
  • length(): number
  • length(): number
  • length(): number
  • length(): number
  • length(): number
  • Returns number

  • Returns number

  • Returns number

  • Returns number

  • Returns number

  • Returns number

  • Returns number

move

  • move(start: number, end: number, index: number): MagicString
  • move(start: number, end: number, index: number): MagicString
  • move(start: number, end: number, index: number): MagicString
  • move(start: number, end: number, index: number): MagicString
  • move(start: number, end: number, index: number): MagicString
  • move(start: number, end: number, index: number): MagicString
  • move(start: number, end: number, index: number): MagicString
  • Parameters

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

    Returns MagicString

  • Parameters

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

    Returns MagicString

  • Parameters

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

    Returns MagicString

  • Parameters

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

    Returns MagicString

  • Parameters

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

    Returns MagicString

  • Parameters

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

    Returns MagicString

  • Parameters

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

    Returns MagicString

overwrite

  • overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): MagicString
  • overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): MagicString
  • overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): MagicString
  • overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): MagicString
  • overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): MagicString
  • overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): MagicString
  • overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): MagicString
  • Parameters

    • start: number
    • end: number
    • content: string
    • Optional options: boolean | OverwriteOptions

    Returns MagicString

  • Parameters

    • start: number
    • end: number
    • content: string
    • Optional options: boolean | OverwriteOptions

    Returns MagicString

  • Parameters

    • start: number
    • end: number
    • content: string
    • Optional options: boolean | OverwriteOptions

    Returns MagicString

  • Parameters

    • start: number
    • end: number
    • content: string
    • Optional options: boolean | OverwriteOptions

    Returns MagicString

  • Parameters

    • start: number
    • end: number
    • content: string
    • Optional options: boolean | OverwriteOptions

    Returns MagicString

  • Parameters

    • start: number
    • end: number
    • content: string
    • Optional options: boolean | OverwriteOptions

    Returns MagicString

  • Parameters

    • start: number
    • end: number
    • content: string
    • Optional options: boolean | OverwriteOptions

    Returns MagicString

prepend

  • prepend(content: string): MagicString
  • prepend(content: string): MagicString
  • prepend(content: string): MagicString
  • prepend(content: string): MagicString
  • prepend(content: string): MagicString
  • prepend(content: string): MagicString
  • prepend(content: string): MagicString
  • Parameters

    • content: string

    Returns MagicString

  • Parameters

    • content: string

    Returns MagicString

  • Parameters

    • content: string

    Returns MagicString

  • Parameters

    • content: string

    Returns MagicString

  • Parameters

    • content: string

    Returns MagicString

  • Parameters

    • content: string

    Returns MagicString

  • Parameters

    • content: string

    Returns MagicString

prependLeft

  • prependLeft(index: number, content: string): MagicString
  • prependLeft(index: number, content: string): MagicString
  • prependLeft(index: number, content: string): MagicString
  • prependLeft(index: number, content: string): MagicString
  • prependLeft(index: number, content: string): MagicString
  • prependLeft(index: number, content: string): MagicString
  • prependLeft(index: number, content: string): MagicString
  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

prependRight

  • prependRight(index: number, content: string): MagicString
  • prependRight(index: number, content: string): MagicString
  • prependRight(index: number, content: string): MagicString
  • prependRight(index: number, content: string): MagicString
  • prependRight(index: number, content: string): MagicString
  • prependRight(index: number, content: string): MagicString
  • prependRight(index: number, content: string): MagicString
  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

  • Parameters

    • index: number
    • content: string

    Returns MagicString

remove

  • remove(start: number, end: number): MagicString
  • remove(start: number, end: number): MagicString
  • remove(start: number, end: number): MagicString
  • remove(start: number, end: number): MagicString
  • remove(start: number, end: number): MagicString
  • remove(start: number, end: number): MagicString
  • remove(start: number, end: number): MagicString
  • Parameters

    • start: number
    • end: number

    Returns MagicString

  • Parameters

    • start: number
    • end: number

    Returns MagicString

  • Parameters

    • start: number
    • end: number

    Returns MagicString

  • Parameters

    • start: number
    • end: number

    Returns MagicString

  • Parameters

    • start: number
    • end: number

    Returns MagicString

  • Parameters

    • start: number
    • end: number

    Returns MagicString

  • Parameters

    • start: number
    • end: number

    Returns MagicString

slice

  • slice(start: number, end: number): string
  • slice(start: number, end: number): string
  • slice(start: number, end: number): string
  • slice(start: number, end: number): string
  • slice(start: number, end: number): string
  • slice(start: number, end: number): string
  • slice(start: number, end: number): string
  • Parameters

    • start: number
    • end: number

    Returns string

  • Parameters

    • start: number
    • end: number

    Returns string

  • Parameters

    • start: number
    • end: number

    Returns string

  • Parameters

    • start: number
    • end: number

    Returns string

  • Parameters

    • start: number
    • end: number

    Returns string

  • Parameters

    • start: number
    • end: number

    Returns string

  • Parameters

    • start: number
    • end: number

    Returns string

snip

  • snip(start: number, end: number): MagicString
  • snip(start: number, end: number): MagicString
  • snip(start: number, end: number): MagicString
  • snip(start: number, end: number): MagicString
  • snip(start: number, end: number): MagicString
  • snip(start: number, end: number): MagicString
  • snip(start: number, end: number): MagicString
  • Parameters

    • start: number
    • end: number

    Returns MagicString

  • Parameters

    • start: number
    • end: number

    Returns MagicString

  • Parameters

    • start: number
    • end: number

    Returns MagicString

  • Parameters

    • start: number
    • end: number

    Returns MagicString

  • Parameters

    • start: number
    • end: number

    Returns MagicString

  • Parameters

    • start: number
    • end: number

    Returns MagicString

  • Parameters

    • start: number
    • end: number

    Returns MagicString

trim

  • trim(charType?: string): MagicString
  • trim(charType?: string): MagicString
  • trim(charType?: string): MagicString
  • trim(charType?: string): MagicString
  • trim(charType?: string): MagicString
  • trim(charType?: string): MagicString
  • trim(charType?: string): MagicString
  • Parameters

    • Optional charType: string

    Returns MagicString

  • Parameters

    • Optional charType: string

    Returns MagicString

  • Parameters

    • Optional charType: string

    Returns MagicString

  • Parameters

    • Optional charType: string

    Returns MagicString

  • Parameters

    • Optional charType: string

    Returns MagicString

  • Parameters

    • Optional charType: string

    Returns MagicString

  • Parameters

    • Optional charType: string

    Returns MagicString

trimEnd

  • trimEnd(charType?: string): MagicString
  • trimEnd(charType?: string): MagicString
  • trimEnd(charType?: string): MagicString
  • trimEnd(charType?: string): MagicString
  • trimEnd(charType?: string): MagicString
  • trimEnd(charType?: string): MagicString
  • trimEnd(charType?: string): MagicString
  • Parameters

    • Optional charType: string

    Returns MagicString

  • Parameters

    • Optional charType: string

    Returns MagicString

  • Parameters

    • Optional charType: string

    Returns MagicString

  • Parameters

    • Optional charType: string

    Returns MagicString

  • Parameters

    • Optional charType: string

    Returns MagicString

  • Parameters

    • Optional charType: string

    Returns MagicString

  • Parameters

    • Optional charType: string

    Returns MagicString

trimLines

  • trimLines(): MagicString
  • trimLines(): MagicString
  • trimLines(): MagicString
  • trimLines(): MagicString
  • trimLines(): MagicString
  • trimLines(): MagicString
  • trimLines(): MagicString
  • Returns MagicString

  • Returns MagicString

  • Returns MagicString

  • Returns MagicString

  • Returns MagicString

  • Returns MagicString

  • Returns MagicString

trimStart

  • trimStart(charType?: string): MagicString
  • trimStart(charType?: string): MagicString
  • trimStart(charType?: string): MagicString
  • trimStart(charType?: string): MagicString
  • trimStart(charType?: string): MagicString
  • trimStart(charType?: string): MagicString
  • trimStart(charType?: string): MagicString
  • Parameters

    • Optional charType: string

    Returns MagicString

  • Parameters

    • Optional charType: string

    Returns MagicString

  • Parameters

    • Optional charType: string

    Returns MagicString

  • Parameters

    • Optional charType: string

    Returns MagicString

  • Parameters

    • Optional charType: string

    Returns MagicString

  • Parameters

    • Optional charType: string

    Returns MagicString

  • Parameters

    • Optional charType: string

    Returns MagicString

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method