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

Method length

src/Bundle.ts:311–318  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

309 }
310
311 length(): number {
312 return this.sources.reduce((length, source, i) => {
313 // mirrors toString(): every source but the first is preceded by a separator
314 const separator = source.separator !== undefined ? source.separator : this.separator
315
316 return length + (i > 0 ? separator.length : 0) + source.content.length()
317 }, this.intro.length)
318 }
319
320 trimLines(): this {
321 return this.trim('[\\r\\n]')

Callers 2

Bundle.test.tsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected