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
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:288
Method
getIndentString
()
benchmark/data.js:388
Method
getIndentString
()
benchmark/data-min.js:315
Method
getIndentString
()
src/MagicString.ts:305
Method
getReplacement
(match, str)
benchmark/data.js:788
Method
getReplacement
(match: RegExpMatchArray, str: string)
src/MagicString.ts:1118
Method
hasChanged
()
benchmark/data.js:784
Method
hasChanged
* Indicates if the string has been changed.
src/MagicString.ts:1112
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:323
Method
indentAt
(index: number)
src/MagicString.ts:370
Method
insert
()
benchmark/data.js:455
Method
insert
@internal
src/MagicString.ts:449
Method
insertLeft
(index, content)
benchmark/data.js:460
Method
insertLeft
(t, e)
benchmark/data-min.js:368
Method
insertLeft
@internal
src/MagicString.ts:456
Method
insertRight
(index, content)
benchmark/data.js:469
Method
insertRight
(t, e)
benchmark/data-min.js:378
Method
insertRight
@internal
src/MagicString.ts:468
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:989
Method
lastLine
()
benchmark/data.js:609
Method
lastLine
()
src/MagicString.ts:815
Method
length
()
benchmark/data.js:722
Method
length
()
benchmark/data.js:1016
Method
length
()
benchmark/data-min.js:813
Method
length
()
src/MagicString.ts:1004
Method
matchAll
(re, str)
benchmark/data.js:801
Method
matchAll
(re: RegExp, str: string)
src/MagicString.ts:1136
Method
move
(start, end, index)
benchmark/data.js:478
Method
move
* Moves the characters from `start` and `end` to `index`.
src/MagicString.ts:482
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:652
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:663
Function
replacer
(match, p1, p2, p3, offset, string, groups)
test/MagicString.test.ts:1900
Method
replacer
(match)
benchmark/data.js:411
Method
replacer
(match: string)
src/MagicString.ts:358
Method
reset
* Reset the modified characters from `start` to `end` (of the original string, **not** the generated string).
src/MagicString.ts:761
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:912
Method
toString
()
benchmark/data.js:1001
Method
toString
()
benchmark/data-min.js:798
Method
toString
()
src/Bundle.ts:288
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:106
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:1017
← previous
201–270 of 270, ranked by callers