Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Rich-Harris/magic-string
/ functions
Functions
277 in github.com/Rich-Harris/magic-string
⨍
Functions
277
◇
Types & classes
57
Method
constructor
(t = {})
benchmark/data-min.js:676
Method
constructor
(properties: DecodedSourceMap)
src/SourceMap.ts:95
Method
constructor
(options: BundleOptions = {})
src/Bundle.ts:63
Method
constructor
(string: string, options: MagicStringOptions = {})
src/MagicString.ts:172
Method
constructor
(arg?: BitSet)
src/BitSet.ts:4
Method
constructor
(start: number, end: number, content: string)
src/Chunk.ts:15
Method
constructor
(message: string, options?: ErrorOptions)
src/MagicStringError.ts:10
Method
constructor
()
src/utils/Stats.ts:7
Method
constructor
(hires: SourceMapOptions['hires'])
src/utils/Mappings.ts:23
Method
eachPrevious
(fn)
benchmark/data.js:53
Method
eachPrevious
(t)
benchmark/data-min.js:52
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:392
Method
getIndentString
()
benchmark/data.js:388
Method
getIndentString
()
benchmark/data-min.js:315
Method
getIndentString
()
src/MagicString.ts:409
Method
getReplacement
(match, str)
benchmark/data.js:788
Method
getReplacement
(match: RegExpMatchArray, str: string)
src/MagicString.ts:1362
Method
hasChanged
()
benchmark/data.js:784
Method
hasChanged
* Indicates if the string has been changed.
src/MagicString.ts:1323
Method
i
(r, s)
benchmark/data-min.js:657
Function
includeContent
(source)
test/Bundle.test.ts:788
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:427
Method
indentAt
(index: number)
src/MagicString.ts:483
Method
indentPiece
(str: string)
src/MagicString.ts:466
Method
insert
()
benchmark/data.js:455
Method
insert
@internal
src/MagicString.ts:570
Method
insertLeft
(index, content)
benchmark/data.js:460
Method
insertLeft
@internal
src/MagicString.ts:575
Method
insertRight
(index, content)
benchmark/data.js:469
Method
insertRight
@internal
src/MagicString.ts:587
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:1189
Method
lastLine
()
benchmark/data.js:609
Method
lastLine
()
src/MagicString.ts:1003
Method
length
()
benchmark/data.js:722
Method
length
()
benchmark/data.js:1016
Method
length
()
benchmark/data-min.js:813
Method
length
()
src/MagicString.ts:1209
Method
move
(start, end, index)
benchmark/data.js:478
Method
move
* Moves the characters from `start` and `end` to `index`.
src/MagicString.ts:601
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:814
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:826
Method
replaceMatch
(match: RegExpMatchArray)
src/MagicString.ts:1382
Function
replacer
(match: string, p1: string, p2: string, p3: string, offset: number, string: string, groups: Record<string, str
test/MagicString/replace.test.ts:228
Method
replacer
(match)
benchmark/data.js:411
Method
reset
* Reset the modified characters from `start` to `end` (of the original string, **not** the generated string).
src/MagicString.ts:943
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:1110
Method
toString
()
benchmark/data.js:1001
Method
toString
()
benchmark/data-min.js:798
Method
toString
* Returns the generated string.
src/MagicString.ts:1174
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:133
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:1222
← previous
201–277 of 277, ranked by callers