MCPcopy
hub / github.com/niklasvh/html2canvas / consumeStringSlice

Method consumeStringSlice

src/css/syntax/tokenizer.ts:659–670  ·  view source on GitHub ↗
(count: number)

Source from the content-addressed store, hash-verified

657 }
658
659 private consumeStringSlice(count: number): string {
660 const SLICE_STACK_SIZE = 50000;
661 let value = '';
662 while (count > 0) {
663 const amount = Math.min(SLICE_STACK_SIZE, count);
664 value += fromCodePoint(...this._value.splice(0, amount));
665 count -= amount;
666 }
667 this._value.shift();
668
669 return value;
670 }
671
672 private consumeStringToken(endingCodePoint: number): StringValueToken | Token {
673 let value = '';

Callers 1

consumeStringTokenMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected