electron-userland / electron-json-storage

:package: Easily write and read user settings in Electron apps
1.44k stars 80 forks source link

setMany() #58

Open ArsNV opened 7 years ago

ArsNV commented 7 years ago

Hi What about setMany() method For example
array['key1'] = json; array['key2'] = json; array['key3'] = json; storage.setMany(array,function(result){});

jviotti commented 7 years ago

I'd definitely accept a PR for such a function. Accepting an object is probably better than an array though:

storage.setMany({
    key1: json,
    key2: json,
    key3: json
}, function(error) {
    ...
});
ArsNV commented 7 years ago

Thanks

Rob-- commented 7 years ago

Created a PR ( #74 )