MCPcopy Create free account

hub / github.com/Rich-Harris/magic-string / functions

Functions293 in github.com/Rich-Harris/magic-string

↓ 30 callersMethodtoString
()
src/Chunk.ts:155
↓ 18 callersMethodoverwrite
(t, e, n, i)
benchmark/data-min.js:412
↓ 15 callersMethodappend
(str: string, options?: BundleOptions)
src/Bundle.ts:125
↓ 15 callersMethodprepend
(str: string)
src/Bundle.ts:444
↓ 15 callersMethodremove
(t, e)
benchmark/data-min.js:468
↓ 14 callersMethodaddSource
* Adds the specified source to the bundle, which can either be a `MagicString` object directly, * or an options object that holds a magic string `c
src/Bundle.ts:83
↓ 14 callersMethodappendLeft
(content: string)
src/Chunk.ts:41
↓ 12 callersMethodprependRight
(content: string)
src/Chunk.ts:102
↓ 12 callersMethodreplace
(t, e)
benchmark/data-min.js:649
↓ 11 callersMethodmove
(t, e, n)
benchmark/data-min.js:388
↓ 11 callersMethodslice
(t = 0, e = this.original.length)
benchmark/data-min.js:514
↓ 10 callersMethodslice
* Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string. * Throws error if the
src/MagicString.ts:1099
↓ 10 callersMethodtime
(label: string)
src/utils/Stats.ts:13
↓ 10 callersMethodtimeEnd
(label: string)
src/utils/Stats.ts:17
↓ 9 callersMethodreplace
(searchValue, replacement)
benchmark/data.js:787
↓ 9 callersMethodsplit
(index)
benchmark/data.js:76
↓ 9 callersMethodsplit
(t)
benchmark/data-min.js:71
↓ 9 callersMethodsplit
(index: number)
src/Chunk.ts:116
↓ 8 callersMethod_split
@internal
src/MagicString.ts:1176
↓ 8 callersMethodreplace
* String replacement with RegExp or string.
src/MagicString.ts:1549
↓ 7 callersMethod_split
(index)
benchmark/data.js:677
↓ 7 callersMethod_split
(t)
benchmark/data-min.js:543
↓ 7 callersMethodappendRight
(content: string)
src/Chunk.ts:45
↓ 7 callersMethodupdate
* Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. * * The fourth argument is optional
src/MagicString.ts:777
↓ 6 callersMethodgenerateMap
( options: BundleSourceMapOptions = {}, )
src/Bundle.ts:271
↓ 6 callersMethodtrim
(charType?: string)
src/Bundle.ts:492
↓ 5 callersMethodclone
()
src/Chunk.ts:49
↓ 5 callersMethodedit
(content, storeName, contentOnly)
benchmark/data.js:60
↓ 5 callersMethodedit
(t, e, n)
benchmark/data-min.js:56
↓ 5 callersMethodedit
(content: string, storeName?: boolean, contentOnly?: boolean)
src/Chunk.ts:85
↓ 5 callersMethodslice
(start = 0, end = this.original.length)
benchmark/data.js:635
↓ 4 callersMethodadd
(n: number)
src/BitSet.ts:8
↓ 4 callersMethodaddSourcemapLocation
(t)
benchmark/data-min.js:249
↓ 4 callersMethodadvance
(str: string)
src/utils/Mappings.ts:193
↓ 4 callersMethodappendRight
* Appends the specified content at the index in the original string. * If a range *starting* with index is subsequently moved, the insert will be m
src/MagicString.ts:258
↓ 4 callersMethodfinish
(segments: FullSegment[])
src/utils/MappingsEncoder.ts:77
↓ 4 callersFunctiongetLocator
(source: string)
src/utils/getLocator.ts:6
↓ 4 callersMethodindent
(indentStr?: string)
src/Bundle.ts:410
↓ 4 callersMethodprependLeft
(content: string)
src/Chunk.ts:98
↓ 4 callersMethodreset
()
src/Chunk.ts:106
↓ 3 callersFunctionC
(l)
benchmark/data-min.js:161
↓ 3 callersMethod_ensureindentStr
@internal
src/MagicString.ts:421
↓ 3 callersMethod_hasRemovedContent
* Whether the original range [start, end) has had any of its characters * removed. `replace`/`replaceAll` search `original`, so a match can land on
src/MagicString.ts:1425
↓ 3 callersMethodaddEdit
(sourceIndex: number, content: string, loc: SourceLocation, nameIndex: number)
src/utils/Mappings.ts:51
↓ 3 callersMethodaddUneditedChunk
( sourceIndex: number, chunk: Chunk, original: string, loc: SourceLocation, sourcemapLocat
src/utils/Mappings.ts:91
↓ 3 callersMethodadvance
(str)
benchmark/data.js:258
↓ 3 callersMethodadvance
(t)
benchmark/data-min.js:213
↓ 3 callersMethodcheckIntegrity
()
tests/__utils/IntegrityCheckingMagicString.ts:6
↓ 3 callersMethoddrain
(trailing: FullSegment[] | null)
src/utils/MappingsEncoder.ts:83
↓ 3 callersFunctionexpandReplacement
* Expands the `$` substitution patterns that `String.prototype.replace` accepts * in a string replacement. * https://developer.mozilla.org/en-US/doc
src/MagicString.ts:62
↓ 3 callersMethodgenerateDecodedMap
(options: BundleSourceMapOptions = {})
src/Bundle.ts:260
↓ 3 callersMethodgetIndentString
()
src/Bundle.ts:389
↓ 3 callersFunctiongetLocator
(source)
benchmark/data.js:190
↓ 3 callersFunctiongetRelativePath
(from: string, to: string)
src/utils/getRelativePath.ts:1
↓ 3 callersMethodhasChanged
()
benchmark/data-min.js:646
↓ 3 callersFunctionisObject
(thing: unknown)
src/utils/isObject.ts:3
↓ 3 callersMethodnextLine
()
src/utils/Mappings.ts:36
↓ 3 callersMethodoverwrite
* Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in * that range. The same restrictions as
src/MagicString.ts:757
↓ 3 callersMethodtoString
()
benchmark/data.js:97
↓ 3 callersMethodtoString
()
benchmark/data-min.js:89
↓ 3 callersMethodtrim
(charType)
benchmark/data.js:1025
↓ 3 callersMethodtrim
(t)
benchmark/data-min.js:597
↓ 3 callersMethodtrimEnd
(rx)
benchmark/data.js:100
↓ 3 callersMethodtrimEnd
(t)
benchmark/data-min.js:92
↓ 3 callersMethodtrimEnd
(rx: RegExp)
src/Chunk.ts:159
↓ 3 callersMethodtrimStart
(rx: RegExp)
src/Chunk.ts:188
↓ 2 callersFunctionE
(l, t)
benchmark/data-min.js:147
↓ 2 callersMethod_generateMappings
@internal
src/Bundle.ts:289
↓ 2 callersMethod_generateMappings
@internal
src/MagicString.ts:369
↓ 2 callersMethod_mapProperties
@internal
src/Bundle.ts:367
↓ 2 callersMethod_mapProperties
@internal
src/MagicString.ts:408
↓ 2 callersMethod_replaceRegexp
@internal
src/MagicString.ts:1436
↓ 2 callersMethod_splitChunk
(chunk, index)
benchmark/data.js:686
↓ 2 callersMethod_splitChunk
(t, e)
benchmark/data-min.js:552
↓ 2 callersMethod_splitChunk
@internal
src/MagicString.ts:1203
↓ 2 callersMethodaddEdit
(sourceIndex, content, loc, nameIndex)
benchmark/data.js:222
↓ 2 callersMethodaddEdit
(t, e, n, i)
benchmark/data-min.js:187
↓ 2 callersMethodaddSource
(source)
benchmark/data.js:840
↓ 2 callersMethodaddSource
(t)
benchmark/data-min.js:687
↓ 2 callersMethodaddUneditedChunk
(sourceIndex, chunk, original, loc, sourcemapLocations)
benchmark/data.js:235
↓ 2 callersMethodaddUneditedChunk
(t, e, n, i, r)
benchmark/data-min.js:194
↓ 2 callersMethodclone
()
benchmark/data.js:34
↓ 2 callersMethodclone
()
benchmark/data-min.js:34
↓ 2 callersMethodeachNext
(fn)
benchmark/data.js:46
↓ 2 callersMethodeachNext
(t)
benchmark/data-min.js:48
↓ 2 callersMethodeachNext
(fn: (chunk: Chunk) => void)
src/Chunk.ts:65
↓ 2 callersMethodendLine
(segments: FullSegment[])
src/utils/MappingsEncoder.ts:65
↓ 2 callersMethodflush
()
src/utils/MappingsEncoder.ts:125
↓ 2 callersMethodgenerateDecodedMap
(t)
benchmark/data-min.js:287
↓ 2 callersFunctiongetRelativePath
(from, to)
benchmark/data.js:172
↓ 2 callersFunctionguessIndent
(code: string)
src/utils/guessIndent.ts:1
↓ 2 callersMethodhas
(n: number)
src/BitSet.ts:12
↓ 2 callersMethodindent
(t, e)
benchmark/data-min.js:318
↓ 2 callersMethodisEmpty
()
src/Bundle.ts:463
↓ 2 callersFunctionisObject
(thing)
benchmark/data.js:187
↓ 2 callersMethodlastChar
()
benchmark/data-min.js:480
↓ 2 callersMethodlastLine
()
benchmark/data-min.js:490
↓ 2 callersMethodlength
()
src/Bundle.ts:478
↓ 2 callersMethodoverwrite
(start, end, content, options)
benchmark/data.js:505
↓ 2 callersMethodprependRight
(content)
benchmark/data.js:73
next →1–100 of 293, ranked by callers