import rxDb from "./rxConnect";
export default async function rxSubscribe({ collection, where, sort, callback }) {
    const db = await rxDb();
    db[collection]
        .find()
        .where(where || {})
        .sort(sort || {})
        .$.subscribe((data) => {
        if (!data)
            return;
        callback(data);
    });
}
