MCPcopy Index your code
hub / github.com/exceljs/exceljs / _grow

Method _grow

lib/utils/string-buf.js:42–50  ·  view source on GitHub ↗
(min)

Source from the content-addressed store, hash-verified

40 }
41
42 _grow(min) {
43 let size = this._buf.length * 2;
44 while (size < min) {
45 size *= 2;
46 }
47 const buf = Buffer.alloc(size);
48 this._buf.copy(buf, 0);
49 this._buf = buf;
50 }
51
52 addText(text) {
53 this._buffer = undefined;

Callers 2

addTextMethod · 0.95
addStringBufMethod · 0.95

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected