function removeFullTextMetadataAndReturn()

in src/IndexedDbProvider.ts [469:480]


function removeFullTextMetadataAndReturn<T>(schema: StoreSchema, val: T): T {
    if (val && schema.indexes) {
        // We have full text index fields as real fields on the result, so nuke them before returning them to the caller.
        for (const index of schema.indexes) {
            if (index.fullText) {
                delete (val as any)[IndexPrefix + index.name];
            }
        }
    }

    return val;
}