MCPcopy
hub / github.com/vercel/next.js / constructor

Method constructor

packages/next/src/compiled/@vercel/og/index.edge.js:336–359  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

334 var DATA_GRANULARITY = 1 << INDEX_SHIFT;
335 var UnicodeTrie = class {
336 constructor(data) {
337 const isBuffer = typeof data.readUInt32BE === "function" && typeof data.slice === "function";
338 if (isBuffer || data instanceof Uint8Array) {
339 let uncompressedLength;
340 if (isBuffer) {
341 this.highStart = data.readUInt32LE(0);
342 this.errorValue = data.readUInt32LE(4);
343 uncompressedLength = data.readUInt32LE(8);
344 data = data.slice(12);
345 } else {
346 const view = new DataView(data.buffer);
347 this.highStart = view.getUint32(0, true);
348 this.errorValue = view.getUint32(4, true);
349 uncompressedLength = view.getUint32(8, true);
350 data = data.subarray(12);
351 }
352 data = inflate(data, new Uint8Array(uncompressedLength));
353 data = inflate(data, new Uint8Array(uncompressedLength));
354 swap32LE(data);
355 this.data = new Uint32Array(data.buffer);
356 } else {
357 ({ data: this.data, highStart: this.highStart, errorValue: this.errorValue } = data);
358 }
359 }
360 get(codePoint) {
361 let index;
362 if (codePoint < 0 || codePoint > 1114111) {

Callers

nothing calls this directly

Calls 15

inflateFunction · 0.85
splitMethod · 0.80
trimMethod · 0.80
swap32LEFunction · 0.70
zsFunction · 0.70
LfFunction · 0.70
MfFunction · 0.70
isLikeNoneFunction · 0.70
passStringToWasm0Function · 0.70
addHeapObjectFunction · 0.70
getInt32Memory0Function · 0.70
takeObjectFunction · 0.70

Tested by

no test coverage detected