Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Rich-Harris/magic-string
/ functions
Functions
330 in github.com/Rich-Harris/magic-string
⨍
Functions
330
◇
Types & classes
66
↓ 2 callers
Method
eachNext
(fn)
benchmark/data.js:46
↓ 2 callers
Method
eachNext
(t)
benchmark/data-min.js:48
↓ 2 callers
Method
empty
(start: number, end: number)
tests/fuzz/edit-model.ts:165
↓ 2 callers
Method
endLine
(segments: FullSegment[])
src/utils/MappingsEncoder.ts:67
↓ 2 callers
Method
flush
()
src/utils/MappingsEncoder.ts:128
↓ 2 callers
Function
fresh
()
benchmark/magic-string.bench.ts:18
↓ 2 callers
Method
generateDecodedMap
(options)
benchmark/data.js:353
↓ 2 callers
Method
generateDecodedMap
(t)
benchmark/data-min.js:287
↓ 2 callers
Function
getRelativePath
(from, to)
benchmark/data.js:172
↓ 2 callers
Function
guessIndent
(code: string)
src/utils/guessIndent.ts:1
↓ 2 callers
Method
indent
(t, e)
benchmark/data-min.js:318
↓ 2 callers
Function
isObject
(thing)
benchmark/data.js:187
↓ 2 callers
Method
lastChar
()
benchmark/data-min.js:480
↓ 2 callers
Method
lastLine
()
benchmark/data-min.js:490
↓ 2 callers
Method
length
()
benchmark/data-min.js:587
↓ 2 callers
Method
matchAll
(re, str)
benchmark/data.js:801
↓ 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:868
↓ 2 callers
Method
remove
(t, e)
benchmark/data-min.js:468
↓ 2 callers
Method
segments
(segments: FullSegment[])
src/utils/MappingsEncoder.ts:75
↓ 2 callers
Method
snip
(t, e)
benchmark/data-min.js:539
↓ 2 callers
Method
toMagicString
* Flattens the bundle into a single `MagicString`, so the concatenated result can be * processed further with the full `MagicString` API. The retur
src/Bundle.ts:178
↓ 2 callers
Method
toString
()
benchmark/data.js:701
↓ 2 callers
Method
toString
* Returns the equivalent of `JSON.stringify(map)`
src/SourceMap.ts:125
↓ 2 callers
Method
trim
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end.
src/MagicString.ts:1258
↓ 2 callers
Method
trimEnd
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end.
src/MagicString.ts:1302
↓ 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:1263
↓ 2 callers
Method
trimLines
* Removes empty lines from the start and end.
src/Bundle.ts:468
↓ 2 callers
Method
trimStart
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start.
src/MagicString.ts:1346
↓ 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:1308
↓ 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:386
↓ 1 callers
Method
_replaceAllString
@internal
src/MagicString.ts:1553
↓ 1 callers
Method
_replaceString
@internal
src/MagicString.ts:1506
↓ 1 callers
Method
add
(n2)
benchmark/data.js:6
↓ 1 callers
Method
add
(t)
benchmark/data-min.js:6
↓ 1 callers
Method
addSourcemapLocation
(char)
benchmark/data.js:298
↓ 1 callers
Method
append
* Appends `str` as a new source without a filename. Only `options.separator` is read, and it defaults to `''` * rather than to the bundle separator
src/Bundle.ts:136
↓ 1 callers
Method
appendLeft
(t)
benchmark/data-min.js:28
↓ 1 callers
Method
appendLeft
(t, e)
benchmark/data-min.js:256
↓ 1 callers
Method
appendLeft
* Appends the specified content at the index in the original string. * If a range *ending* with index is subsequently moved, the insert will be mov
src/MagicString.ts:220
↓ 1 callers
Method
appendRight
(content)
benchmark/data.js:31
↓ 1 callers
Method
appendRight
(t)
benchmark/data-min.js:31
↓ 1 callers
Function
applyOp
(target: Editable, op: Op)
tests/fuzz/random-edits.test.ts:84
↓ 1 callers
Function
assertIntegrity
(s: MagicString)
tests/Bundle/toMagicString.test.ts:9
↓ 1 callers
Function
build
(s: MagicString)
tests/MagicString/indent.test.ts:237
↓ 1 callers
Function
check
Returns a description of the first property violated, or null
tests/fuzz/random-edits.test.ts:150
↓ 1 callers
Method
clone
()
benchmark/data-min.js:268
↓ 1 callers
Method
clone
* Returns an independent copy of the bundle: every source's `MagicString` is cloned, so later edits to either * bundle do not affect the other.
src/Bundle.ts:149
↓ 1 callers
Method
clone
* Returns an independent copy: the chunk list, string-level intro/outro, * sourcemap locations, stored names, indent exclusion ranges, `offset`,
src/MagicString.ts:279
↓ 1 callers
Method
contains
(index)
benchmark/data.js:43
↓ 1 callers
Method
contains
(t)
benchmark/data-min.js:45
↓ 1 callers
Function
create
()
tests/MagicString/replace.test.ts:358
↓ 1 callers
Function
create
()
tests/MagicString/replace-all.test.ts:204
↓ 1 callers
Function
differ
(property: string, expected: string | number | boolean, actual: string | number | boolean)
tests/fuzz/random-edits.test.ts:160
↓ 1 callers
Method
eachNext
(fn: (chunk: Chunk) => void)
src/Chunk.ts:63
↓ 1 callers
Method
eachPrevious
(fn: (chunk: Chunk) => void)
src/Chunk.ts:73
↓ 1 callers
Function
edited
()
benchmark/magic-string.bench.ts:22
↓ 1 callers
Function
flatten
(location?: number)
tests/Bundle/toMagicString.test.ts:169
↓ 1 callers
Function
formatOp
(op: Op)
tests/fuzz/random-edits.test.ts:104
↓ 1 callers
Function
generate
(random: () => number)
tests/fuzz/random-edits.test.ts:45
↓ 1 callers
Method
generateDecodedMap
(options = {})
benchmark/data.js:894
↓ 1 callers
Method
generateDecodedMap
(t = {})
benchmark/data-min.js:723
↓ 1 callers
Method
generateMap
(t)
benchmark/data-min.js:312
↓ 1 callers
Function
getBtoa
()
src/SourceMap.ts:63
↓ 1 callers
Method
getIndentString
()
benchmark/data.js:959
↓ 1 callers
Method
getIndentString
()
benchmark/data-min.js:763
↓ 1 callers
Function
guessIndent
(code)
benchmark/data.js:156
↓ 1 callers
Method
has
(n2)
benchmark/data.js:9
↓ 1 callers
Method
has
(t)
benchmark/data-min.js:9
↓ 1 callers
Method
hasChanged
()
benchmark/data.js:784
↓ 1 callers
Method
hasChanged
()
benchmark/data-min.js:646
↓ 1 callers
Method
insert
()
benchmark/data-min.js:363
↓ 1 callers
Method
insertLeft
(t, e)
benchmark/data-min.js:368
↓ 1 callers
Method
insertRight
(t, e)
benchmark/data-min.js:378
↓ 1 callers
Method
isEmpty
()
benchmark/data.js:710
↓ 1 callers
Method
isEmpty
()
benchmark/data-min.js:575
↓ 1 callers
Method
isInsideEditedChunk
Chunks are edited as a whole, so a non-boundary index shares its chunk with char `index`
tests/fuzz/edit-model.ts:156
↓ 1 callers
Method
isInsideHolder
(index: number)
tests/fuzz/edit-model.ts:151
↓ 1 callers
Function
isWordCode
(code: number)
src/utils/Mappings.ts:13
↓ 1 callers
Method
lastChar
()
benchmark/data.js:598
↓ 1 callers
Method
lastChar
* Returns the last character of the generated string, or `''` if it is empty.
src/MagicString.ts:969
↓ 1 callers
Method
length
()
benchmark/data.js:722
↓ 1 callers
Function
loc
(line: number, column: number)
src/utils/Mappings.test.ts:8
↓ 1 callers
Function
mulberry32
(state: number)
tests/fuzz/random-edits.test.ts:36
↓ 1 callers
Method
overwrite
(start, end, content, options)
benchmark/data.js:505
↓ 1 callers
Function
pick
(items: readonly T[])
tests/fuzz/random-edits.test.ts:47
↓ 1 callers
Method
prependLeft
(content)
benchmark/data.js:70
↓ 1 callers
Method
prependLeft
(t)
benchmark/data-min.js:65
↓ 1 callers
Method
prependRight
(index, content)
benchmark/data.js:570
↓ 1 callers
Method
prependRight
(t, e)
benchmark/data-min.js:462
↓ 1 callers
Function
range
()
tests/fuzz/random-edits.test.ts:49
↓ 1 callers
Method
remove
(start, end)
benchmark/data.js:581
← previous
next →
101–200 of 330, ranked by callers