Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Rich-Harris/magic-string
/ functions
Functions
273 in github.com/Rich-Harris/magic-string
⨍
Functions
273
◇
Types & classes
55
Method
constructor
()
src/utils/Stats.ts:7
Method
constructor
(hires: SourceMapOptions['hires'])
src/utils/Mappings.ts:16
Method
eachPrevious
(fn)
benchmark/data.js:53
Method
eachPrevious
(t)
benchmark/data-min.js:52
Method
eachPrevious
(fn: (chunk: Chunk) => void)
src/Chunk.ts:74
Method
generateMap
(options)
benchmark/data.js:956
Method
generateMap
(t)
benchmark/data-min.js:760
Method
generateMap
* Generates a version 3 sourcemap.
src/MagicString.ts:289
Method
getIndentString
()
benchmark/data.js:388
Method
getIndentString
()
benchmark/data-min.js:315
Method
getIndentString
()
src/MagicString.ts:306
Method
getReplacement
(match, str)
benchmark/data.js:788
Method
getReplacement
(match: RegExpMatchArray, str: string)
src/MagicString.ts:1135
Method
hasChanged
()
benchmark/data.js:784
Method
hasChanged
* Indicates if the string has been changed.
src/MagicString.ts:1129
Method
i
(r, s)
benchmark/data-min.js:657
Method
indent
(indentStr, options)
benchmark/data.js:391
Method
indent
(indentStr)
benchmark/data.js:973
Method
indent
(t)
benchmark/data-min.js:773
Method
indent
(indentStr?: string | IndentOptions, options?: IndentOptions)
src/MagicString.ts:324
Method
indentAt
(index: number)
src/MagicString.ts:371
Method
insert
()
benchmark/data.js:455
Method
insert
@internal
src/MagicString.ts:450
Method
insertLeft
(index, content)
benchmark/data.js:460
Method
insertLeft
(t, e)
benchmark/data-min.js:368
Method
insertLeft
@internal
src/MagicString.ts:455
Method
insertRight
(index, content)
benchmark/data.js:469
Method
insertRight
(t, e)
benchmark/data-min.js:378
Method
insertRight
@internal
src/MagicString.ts:467
Method
isEmpty
()
benchmark/data.js:710
Method
isEmpty
()
benchmark/data.js:1011
Method
isEmpty
()
benchmark/data-min.js:807
Method
isEmpty
* Returns true if the resulting source is empty (disregarding white space).
src/MagicString.ts:1006
Method
lastLine
()
benchmark/data.js:609
Method
lastLine
()
src/MagicString.ts:830
Method
length
()
benchmark/data.js:722
Method
length
()
benchmark/data.js:1016
Method
length
()
benchmark/data-min.js:813
Method
length
()
src/MagicString.ts:1021
Method
matchAll
(re, str)
benchmark/data.js:801
Method
matchAll
(re: RegExp, str: string)
src/MagicString.ts:1153
Method
move
(start, end, index)
benchmark/data.js:478
Method
move
* Moves the characters from `start` and `end` to `index`.
src/MagicString.ts:481
Method
n
(r, s)
benchmark/data-min.js:650
Method
prepend
(content)
benchmark/data.js:554
Method
prepend
(str)
benchmark/data.js:997
Method
prepend
(t)
benchmark/data-min.js:452
Method
prepend
(t)
benchmark/data-min.js:795
Method
prepend
* Prepends the string with the specified content.
src/MagicString.ts:660
Method
prependLeft
(index, content)
benchmark/data.js:559
Method
prependLeft
(t, e)
benchmark/data-min.js:456
Method
prependLeft
* Same as `s.appendLeft(...)`, except that the inserted content will go *before* any previous appends or prepends at index
src/MagicString.ts:672
Function
replacer
(match: string, p1: string, p2: string, p3: string, offset: number, string: string, groups: Record<string, str
test/MagicString.test.ts:1947
Method
replacer
(match)
benchmark/data.js:411
Method
replacer
(match: string)
src/MagicString.ts:359
Method
reset
* Reset the modified characters from `start` to `end` (of the original string, **not** the generated string).
src/MagicString.ts:774
Method
s
(a)
benchmark/data-min.js:329
Method
snip
(start, end)
benchmark/data.js:671
Method
snip
* Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed.
src/MagicString.ts:929
Method
toString
()
benchmark/data.js:1001
Method
toString
()
benchmark/data-min.js:798
Method
toString
()
src/Bundle.ts:290
Method
toUrl
()
benchmark/data.js:152
Method
toUrl
* Returns a DataURI containing the sourcemap. Useful for doing this sort of thing: * `generateMap(options?: SourceMapOptions): SourceMap;`
src/SourceMap.ts:107
Method
trimEnd
(charType)
benchmark/data.js:757
Method
trimEnd
(charType)
benchmark/data.js:1043
Method
trimEnd
(t)
benchmark/data-min.js:620
Method
trimEnd
(t)
benchmark/data-min.js:832
Method
trimLines
()
benchmark/data.js:730
Method
trimLines
()
benchmark/data.js:1022
Method
trimLines
()
benchmark/data-min.js:594
Method
trimLines
()
benchmark/data-min.js:816
Method
trimLines
* Removes empty lines from the start and end.
src/MagicString.ts:1034
← previous
201–273 of 273, ranked by callers