MCPcopy Create free account
hub / github.com/Rich-Harris/magic-string / length

Method length

tests/fuzz/edit-model.ts:126–128  ·  view source on GitHub ↗

Like MagicString, leaves out the string intro and outro

()

Source from the content-addressed store, hash-verified

124
125 /** Like MagicString, leaves out the string intro and outro */
126 length(): number {
127 return this.between(0, this.original.length).length
128 }
129
130 hasChanged(): boolean {
131 return this.toString() !== this.original

Callers 3

checkFunction · 0.95
misc.test.tsFile · 0.45
length.test.tsFile · 0.45

Calls 1

betweenMethod · 0.95

Tested by 1

checkFunction · 0.76