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

Documentation Unclear on How to Save Data #194

Open
sarciszewski opened this issue Mar 11, 2014 · 1 comment
Open

Documentation Unclear on How to Save Data #194

sarciszewski opened this issue Mar 11, 2014 · 1 comment

Comments

@sarciszewski
Copy link

So, this is what I want to do:

x = Lawnchair();
x.save('key', my_object );
// ... elsewhere, back at the ranch ...
x = Lawnchair();
loaded_object = x.load('key');

I've looked through the documentation and I'm not sure how to go about it.

@sarciszewski
Copy link
Author

After farting around on Google and StackOverflow and playing with a sandbox, I figured it out. However, the documentation really ought to be updated to reflect just how useful and powerful the library is (and to make it easier to jump into).

var list = Lawnchair({name: 'arbitrary'});
list.save({key: 'user_defined', value: dataHere});
/////////////////////
var loaded_object;
list.get('user_defined', function(obj) {
    loaded_object = obj.value;
});

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