Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exporting to disk #1077

Open
frumbert opened this issue Jan 6, 2023 · 0 comments
Open

exporting to disk #1077

frumbert opened this issue Jan 6, 2023 · 0 comments

Comments

@frumbert
Copy link

frumbert commented Jan 6, 2023

I'm looking for a way to iterate all my objects and store them to disk (json/bson). It's simple enough to iterate

let result = {};
        localforage.iterate(function(value,key) {
            result[key] = value;
        }).catch(function(err) {
            console.trace(err);
            return undefined;
        });
        
    console.dir(result); // yields -> keys and values
    console.dir(JSON.stringify(result)); // yields empty object -> {}

but most of those values are complex/nested objects containing potentially-large Blobs/ArrayBuffers/strings/arrays/objects etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant