"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "normalizePrinterFile", {
    enumerable: true,
    get: function() {
        return normalizePrinterFile;
    }
});
function normalizePrinterFile(file) {
    if (!file) {
        throw new Error("File should not be null for normalization");
    }
    const keys = Object.keys(file);
    const fileCopy = {
        ...file
    };
    const knownKeys = [
        "path",
        "date",
        "hash",
        "size"
    ];
    const unknownKeys = keys.filter((k)=>!knownKeys.includes(k));
    const customData = {};
    for (const unknownKey of unknownKeys){
        customData[unknownKey] = fileCopy[unknownKey];
        delete fileCopy[unknownKey];
    }
    fileCopy.customData = customData;
    return fileCopy;
}

//# sourceMappingURL=file.utils.js.map