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", "")})`);