MCPcopy Create free account

hub / github.com/Rich-Harris/magic-string / functions

Functions330 in github.com/Rich-Harris/magic-string

↓ 1 callersMethodremove
* Removes the characters from `start` to `end` (of the original string, **not** the generated string). * Content appended or prepended at positions
src/MagicString.ts:899
↓ 1 callersFunctionremoved
()
tests/MagicString/replace-all.test.ts:161
↓ 1 callersFunctionsliceOutcome
(fn: () => string, expected: typeof MagicStringError | typeof EditModelError)
tests/fuzz/random-edits.test.ts:138
↓ 1 callersFunctionstoreNames
(s: MagicString)
benchmark/magic-string.bench.ts:26
↓ 1 callersFunctionthrows
Whether `fn` threw `expected`; any other error is a crash and propagates
tests/fuzz/random-edits.test.ts:126
↓ 1 callersMethodtoString
()
benchmark/data.js:149
↓ 1 callersMethodtoString
()
benchmark/data-min.js:127
↓ 1 callersMethodtoString
()
benchmark/data-min.js:569
↓ 1 callersMethodtoString
* Returns the intro followed by every source's generated string, joined by their separators.
src/Bundle.ts:428
↓ 1 callersMethodtoString
()
src/Chunk.ts:151
↓ 1 callersMethodtoUrl
()
benchmark/data-min.js:130
↓ 1 callersMethodtoUrl
* Returns a DataURI containing the sourcemap. Useful for doing this sort of thing: * `generateMap(options?: SourceMapOptions): SourceMap;`
src/SourceMap.ts:133
↓ 1 callersMethodtrim
(charType)
benchmark/data.js:733
↓ 1 callersMethodtrim
(t)
benchmark/data-min.js:819
↓ 1 callersMethodtrimEnd
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end.
src/Bundle.ts:511
↓ 1 callersMethodtrimStart
(rx)
benchmark/data.js:115
↓ 1 callersMethodtrimStart
(charType)
benchmark/data.js:780
↓ 1 callersMethodtrimStart
(charType)
benchmark/data.js:1028
↓ 1 callersMethodtrimStart
(t)
benchmark/data-min.js:100
↓ 1 callersMethodtrimStart
(t)
benchmark/data-min.js:643
↓ 1 callersMethodtrimStart
(t)
benchmark/data-min.js:822
↓ 1 callersMethodtrimStart
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start.
src/Bundle.ts:482
↓ 1 callersMethodupdate
* Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. * * The fourth argument is optional
src/MagicString.ts:754
↓ 1 callersFunctionw
()
benchmark/data-min.js:112
↓ 1 callersFunctionwriteVlq
(pos: number, num: number)
src/utils/MappingsEncoder.ts:26
MethodaddSourcemapLocation
* Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false.
src/MagicString.ts:199
Methodappend
(content)
benchmark/data.js:301
Methodappend
(str, options)
benchmark/data.js:873
Methodappend
(t)
benchmark/data-min.js:252
Methodappend
(t, e)
benchmark/data-min.js:711
Methodappend
* Appends the specified content to the end of the string.
src/MagicString.ts:206
MethodappendLeft
(content: string)
src/Chunk.ts:37
MethodappendRight
(index, content)
benchmark/data.js:317
MethodappendRight
(t, e)
benchmark/data-min.js:262
MethodappendRight
(content: string)
src/Chunk.ts:41
Methodclone
()
benchmark/data.js:880
Methodclone
()
benchmark/data-min.js:714
Methodconstructor
(arg)
benchmark/data.js:3
Methodconstructor
(start, end, content)
benchmark/data.js:14
Methodconstructor
(properties)
benchmark/data.js:141
Methodconstructor
(hires)
benchmark/data.js:214
Methodconstructor
(string, options = {})
benchmark/data.js:278
Methodconstructor
(options = {})
benchmark/data.js:833
Methodconstructor
(t)
benchmark/data-min.js:3
Methodconstructor
(t, e, n)
benchmark/data-min.js:14
Methodconstructor
(t)
benchmark/data-min.js:119
Methodconstructor
(t)
benchmark/data-min.js:179
Methodconstructor
(t, e = {})
benchmark/data-min.js:229
Methodconstructor
(t = {})
benchmark/data-min.js:676
Methodconstructor
(properties: DecodedSourceMap | (Omit<DecodedSourceMap, 'mappings'> & { mappings: string }))
src/SourceMap.ts:95
Methodconstructor
(options: BundleOptions = {})
src/Bundle.ts:73
Methodconstructor
* Wraps `string` for editing; every index passed to the editing methods refers to this original string.
src/MagicString.ts:173
Methodconstructor
(arg?: BitSet)
src/BitSet.ts:4
Methodconstructor
(start: number, end: number, content: string)
src/Chunk.ts:19
Methodconstructor
(message: string, options?: ErrorOptions)
src/MagicStringError.ts:10
Methodconstructor
(hires: SourceMapOptions['hires'], encoder: MappingsEncoder | null = null)
src/utils/Mappings.ts:27
Methodconstructor
()
src/utils/MappingsEncoder.ts:54
Methodconstructor
(original: string)
tests/fuzz/edit-model.ts:23
MethodeachPrevious
(fn)
benchmark/data.js:53
MethodeachPrevious
(t)
benchmark/data-min.js:52
MethodgenerateDecodedMap
* Generates a sourcemap object with raw mappings in array form, rather than encoded as a string. * Useful if you need to manipulate the sourcemap f
src/MagicString.ts:328
MethodgenerateMap
(options)
benchmark/data.js:385
MethodgenerateMap
(options)
benchmark/data.js:956
MethodgenerateMap
(t)
benchmark/data-min.js:760
MethodgenerateMap
* Generates a version 3 sourcemap.
src/MagicString.ts:344
MethodgetIndentString
()
benchmark/data.js:388
MethodgetIndentString
()
benchmark/data-min.js:315
MethodgetIndentString
* Returns the indentation string guessed from the original content, falling back to a single tab character. * This is the value `s.indent()` uses w
src/MagicString.ts:395
MethodgetReplacement
(match, str)
benchmark/data.js:788
MethodgetReplacement
(match: RegExpMatchArray, index: number, str: string)
src/MagicString.ts:1432
MethodhasChanged
* Indicates if the string has been changed.
src/MagicString.ts:1354
Methodi
(r, s)
benchmark/data-min.js:657
FunctionincludeContent
(source)
tests/Bundle/generate-map.test.ts:659
Methodindent
(indentStr, options)
benchmark/data.js:391
Methodindent
(indentStr)
benchmark/data.js:973
Methodindent
(t)
benchmark/data-min.js:773
Methodindent
(indentStr?: string | IndentOptions, options?: IndentOptions)
src/MagicString.ts:413
MethodindentAt
(index: number)
src/MagicString.ts:469
MethodindentPiece
(str: string)
src/MagicString.ts:451
Methodinsert
()
benchmark/data.js:455
Methodinsert
@internal
src/MagicString.ts:560
MethodinsertLeft
(index, content)
benchmark/data.js:460
MethodinsertLeft
@internal
src/MagicString.ts:565
MethodinsertRight
(index, content)
benchmark/data.js:469
MethodinsertRight
@internal
src/MagicString.ts:577
MethodisEmpty
()
benchmark/data.js:1011
MethodisEmpty
()
benchmark/data-min.js:807
MethodisEmpty
* Returns true if the bundle's output is empty (disregarding white space).
src/Bundle.ts:443
MethodisEmpty
* Returns true if the resulting source is empty (disregarding white space).
src/MagicString.ts:1213
MethodlastLine
()
benchmark/data.js:609
MethodlastLine
* Returns everything after the last newline in the generated string, or the whole string if there is no newline.
src/MagicString.ts:990
Methodlength
()
benchmark/data.js:1016
Methodlength
()
benchmark/data-min.js:813
Methodlength
* Returns the length of the bundle's output; unlike `MagicString#length`, this equals `bundle.toString().length`.
src/Bundle.ts:458
Methodlength
* Returns the length of the generated string, counting only content attached to the original characters. * Content outside the string body (`s.prep
src/MagicString.ts:1238
Methodmove
(start, end, index)
benchmark/data.js:478
Methodmove
* Moves the characters from `start` and `end` to `index`. * * `affinity` controls where the range is anchored at `index`. With the * default
src/MagicString.ts:597
Methodn
(r, s)
benchmark/data-min.js:650
Methodprepend
(content)
benchmark/data.js:554
Methodprepend
(str)
benchmark/data.js:997
← previousnext →201–300 of 330, ranked by callers