Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
22 lines
504 B
Plaintext
22 lines
504 B
Plaintext
'use strict';
|
|
|
|
// lib/types/utils.ts
|
|
new TextDecoder();
|
|
var getView = (input, offset) => new DataView(input.buffer, input.byteOffset + offset);
|
|
var readUInt16LE = (input, offset = 0) => getView(input, offset).getUint16(0, true);
|
|
|
|
// lib/types/tga.ts
|
|
var TGA = {
|
|
validate(input) {
|
|
return readUInt16LE(input, 0) === 0 && readUInt16LE(input, 4) === 0;
|
|
},
|
|
calculate(input) {
|
|
return {
|
|
height: readUInt16LE(input, 14),
|
|
width: readUInt16LE(input, 12)
|
|
};
|
|
}
|
|
};
|
|
|
|
exports.TGA = TGA;
|