web-shared-preferences-fs-pollyfill
v1.0.1
Published
Pollyfill to use SharedPreferences outside of browsers
Downloads
3
Maintainers
Readme
SharedPreferences FS Pollyfill
Pollyfill to use SharedPreferences outside of browsers.
I know, it should be an "polyfill", ignore my type mistake
Install
bun add web-shared-preferences-fs-pollyfill
Setup
There is currently no support for React as useString or something!
const pref = new SharedPreferences(new SharedPreferencesFsPollyfill("./local.json"));
pref.setString("name", "Kevin");
pref.setString("last", "Olaf");
pref.setJSON("json", {
name: "Hellow",
});
console.log(`${pref.getString("name", null)} (${pref.getString("last", "")})`);