(data)
| 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) { |
nothing calls this directly
no test coverage detected