dist/storageEngine/RedisStorageEngine.js
/**
     * Filter for an object
     * @param fn filter function to use
     * @param ids array of ids that should be used for the filtering
     * @param namespace namespace of the filter
     * @returns filtered data
     */
Filter for an object
@param fn filter function to use
@param ids array of ids that should be used for the filtering
@param namespace namespace of the filter
@returns filtered data
Filter for an object @param fn filter function to use @param ids array of ids that should be used for the filtering @param namespace namespace of the filter @returns filtered data
async filter(fn, ids, namespace) {
        const resolvedDataArray = [];
        let data = [];
        if (!ids) {
            data = await this.getListMembers(namespace);
        }
        else {
            data = ids;
        }
        data = data.map(id => `${namespace}.${id}`);
        for (const key of data) {
            const resolvedData = await this.get(key);
            if (resolvedData)
                resolvedDataArray.push(resolvedData);
        }
        return resolvedDataArray.filter(fn);
    }
async filter ( fn , ids , namespace ) { const resolvedDataArray = [ ] ; let data = [ ] ; if ( ! ids ) { data = await this . getListMembers ( namespace ) ; } else { data = ids ; } data = data . map ( id => ` ${ namespace } ${ id } ` ) ; for ( const key of data ) { const resolvedData = await this . get ( key ) ; if ( resolvedData ) resolvedDataArray . push ( resolvedData ) ; } return resolvedDataArray . filter ( fn ) ; }
Filter for an object
 @param fn filter function to use
 @param ids array of ids that should be used for the filtering
 @param namespace namespace of the filter
 @returns filtered data
Filter for an object @param fn filter function to use @param ids array of ids that should be used for the filtering @param namespace namespace of the filter @returns filtered data