Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Rich-Harris/magic-string
/ functions
Functions
270 in github.com/Rich-Harris/magic-string
⨍
Functions
270
◇
Types & classes
52
↓ 11 callers
Method
replace
(t, e)
benchmark/data-min.js:649
↓ 10 callers
Method
split
(index: number)
src/Chunk.ts:115
↓ 9 callers
Method
replace
(searchValue, replacement)
benchmark/data.js:787
↓ 9 callers
Method
replace
* String replacement with RegExp or string.
src/MagicString.ts:1190
↓ 9 callers
Method
split
(index)
benchmark/data.js:76
↓ 9 callers
Method
split
(t)
benchmark/data-min.js:71
↓ 9 callers
Method
time
(label: string)
src/utils/Stats.ts:13
↓ 9 callers
Method
timeEnd
(label: string)
src/utils/Stats.ts:17
↓ 8 callers
Method
_split
@internal
src/MagicString.ts:921
↓ 8 callers
Method
slice
* 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:854
↓ 7 callers
Method
_split
(index)
benchmark/data.js:677
↓ 7 callers
Method
_split
(t)
benchmark/data-min.js:543
↓ 6 callers
Method
slice
(t = 0, e = this.original.length)
benchmark/data-min.js:514
↓ 5 callers
Method
edit
(content, storeName, contentOnly)
benchmark/data.js:60
↓ 5 callers
Method
edit
(t, e, n)
benchmark/data-min.js:56
↓ 5 callers
Method
edit
(content: string, storeName?: boolean, contentOnly?: boolean)
src/Chunk.ts:84
↓ 5 callers
Method
slice
(start = 0, end = this.original.length)
benchmark/data.js:635
↓ 4 callers
Method
overwrite
(t, e, n, i)
benchmark/data-min.js:412
↓ 4 callers
Method
toString
()
src/Chunk.ts:154
↓ 4 callers
Method
trim
(charType?: string)
src/Bundle.ts:320
↓ 3 callers
Function
C
(l)
benchmark/data-min.js:161
↓ 3 callers
Method
_ensureindentStr
@internal
src/MagicString.ts:293
↓ 3 callers
Method
addSource
* 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:65
↓ 3 callers
Method
advance
(str)
benchmark/data.js:258
↓ 3 callers
Method
advance
(t)
benchmark/data-min.js:213
↓ 3 callers
Method
advance
(str: string)
src/utils/Mappings.ts:135
↓ 3 callers
Method
append
(str: string, options?: BundleOptions)
src/Bundle.ts:107
↓ 3 callers
Function
getLocator
(source)
benchmark/data.js:190
↓ 3 callers
Function
getLocator
(source: string)
src/utils/getLocator.ts:6
↓ 3 callers
Method
overwrite
* 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:551
↓ 3 callers
Method
remove
(t, e)
benchmark/data-min.js:468
↓ 3 callers
Method
toString
()
benchmark/data.js:97
↓ 3 callers
Method
toString
()
benchmark/data-min.js:89
↓ 3 callers
Method
trim
(charType)
benchmark/data.js:1025
↓ 3 callers
Method
trim
(t)
benchmark/data-min.js:597
↓ 3 callers
Method
trimEnd
(rx)
benchmark/data.js:100
↓ 3 callers
Method
trimEnd
(t)
benchmark/data-min.js:92
↓ 2 callers
Function
E
(l, t)
benchmark/data-min.js:147
↓ 2 callers
Method
_replaceRegexp
@internal
src/MagicString.ts:1117
↓ 2 callers
Method
_splitChunk
(chunk, index)
benchmark/data.js:686
↓ 2 callers
Method
_splitChunk
(t, e)
benchmark/data-min.js:552
↓ 2 callers
Method
_splitChunk
@internal
src/MagicString.ts:947
↓ 2 callers
Method
addEdit
(sourceIndex, content, loc, nameIndex)
benchmark/data.js:222
↓ 2 callers
Method
addEdit
(t, e, n, i)
benchmark/data-min.js:187
↓ 2 callers
Method
addEdit
(sourceIndex: number, content: string, loc: SourceLocation, nameIndex: number)
src/utils/Mappings.ts:25
↓ 2 callers
Method
addSource
(source)
benchmark/data.js:840
↓ 2 callers
Method
addSource
(t)
benchmark/data-min.js:687
↓ 2 callers
Method
addSourcemapLocation
(t)
benchmark/data-min.js:249
↓ 2 callers
Method
addUneditedChunk
(sourceIndex, chunk, original, loc, sourcemapLocations)
benchmark/data.js:235
↓ 2 callers
Method
addUneditedChunk
(t, e, n, i, r)
benchmark/data-min.js:194
↓ 2 callers
Method
addUneditedChunk
( sourceIndex: number, chunk: Chunk, original: string, loc: SourceLocation, sourcemapLocat
src/utils/Mappings.ts:73
↓ 2 callers
Method
appendLeft
(content: string)
src/Chunk.ts:40
↓ 2 callers
Method
clone
()
benchmark/data.js:34
↓ 2 callers
Method
clone
()
benchmark/data-min.js:34
↓ 2 callers
Method
clone
()
src/Chunk.ts:48
↓ 2 callers
Method
eachNext
(fn)
benchmark/data.js:46
↓ 2 callers
Method
eachNext
(t)
benchmark/data-min.js:48
↓ 2 callers
Method
eachNext
(fn: (chunk: Chunk) => void)
src/Chunk.ts:64
↓ 2 callers
Method
generateDecodedMap
(t)
benchmark/data-min.js:287
↓ 2 callers
Method
generateDecodedMap
(options: SourceMapOptions = {})
src/Bundle.ts:133
↓ 2 callers
Method
generateMap
( options?: SourceMapOptions, )
src/Bundle.ts:221
↓ 2 callers
Method
getIndentString
()
src/Bundle.ts:229
↓ 2 callers
Function
getRelativePath
(from, to)
benchmark/data.js:172
↓ 2 callers
Function
getRelativePath
(from: string, to: string)
src/utils/getRelativePath.ts:1
↓ 2 callers
Method
indent
(t, e)
benchmark/data-min.js:318
↓ 2 callers
Method
indent
(indentStr?: string)
src/Bundle.ts:250
↓ 2 callers
Function
isObject
(thing)
benchmark/data.js:187
↓ 2 callers
Function
isObject
(thing: unknown)
src/utils/isObject.ts:3
↓ 2 callers
Method
move
(t, e, n)
benchmark/data-min.js:388
↓ 2 callers
Method
overwrite
(start, end, content, options)
benchmark/data.js:505
↓ 2 callers
Method
prepend
(str: string)
src/Bundle.ts:283
↓ 2 callers
Method
prependRight
(content)
benchmark/data.js:73
↓ 2 callers
Method
prependRight
(t)
benchmark/data-min.js:68
↓ 2 callers
Method
prependRight
* Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index`
src/MagicString.ts:691
↓ 2 callers
Method
prependRight
(content: string)
src/Chunk.ts:101
↓ 2 callers
Method
snip
(t, e)
benchmark/data-min.js:539
↓ 2 callers
Method
toString
()
benchmark/data.js:701
↓ 2 callers
Method
toString
* Returns the equivalent of `JSON.stringify(map)`
src/SourceMap.ts:98
↓ 2 callers
Method
toUrl
()
benchmark/data-min.js:130
↓ 2 callers
Method
trim
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end.
src/MagicString.ts:1024
↓ 2 callers
Method
trimEnd
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end.
src/MagicString.ts:1064
↓ 2 callers
Method
trimEndAborted
(charType)
benchmark/data.js:736
↓ 2 callers
Method
trimEndAborted
(t)
benchmark/data-min.js:600
↓ 2 callers
Method
trimEndAborted
@internal
src/MagicString.ts:1029
↓ 2 callers
Method
trimStart
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start.
src/MagicString.ts:1104
↓ 2 callers
Method
trimStartAborted
(charType)
benchmark/data.js:761
↓ 2 callers
Method
trimStartAborted
(t)
benchmark/data-min.js:623
↓ 2 callers
Method
trimStartAborted
@internal
src/MagicString.ts:1070
↓ 2 callers
Method
update
* Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. * * The fourth argument is optional
src/MagicString.ts:571
↓ 2 callers
Function
x
(l)
benchmark/data-min.js:158
↓ 1 callers
Function
L
(l)
benchmark/data-min.js:134
↓ 1 callers
Function
_btoa
()
benchmark/data.js:132
↓ 1 callers
Method
_getRawIndentString
@internal
src/MagicString.ts:300
↓ 1 callers
Method
_replaceAllString
@internal
src/MagicString.ts:1199
↓ 1 callers
Method
_replaceString
@internal
src/MagicString.ts:1171
↓ 1 callers
Method
add
(n2)
benchmark/data.js:6
↓ 1 callers
Method
add
(t)
benchmark/data-min.js:6
↓ 1 callers
Method
add
(n: number)
src/BitSet.ts:8
↓ 1 callers
Method
append
(t)
benchmark/data-min.js:252
↓ 1 callers
Method
appendLeft
(content)
benchmark/data.js:28
next →
1–100 of 270, ranked by callers