web-shared-preferences-fs-pollyfill
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

SharedPreferences FS Pollyfill

Pollyfill to use SharedPreferences outside of browsers.

I know, it should be an "polyfill", ignore my type mistake

npm npm NPM

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

Package Sidebar

Install

npm i web-shared-preferences-fs-pollyfill

Weekly Downloads

1

Version

1.0.1

License

GPL-3.0

Unpacked Size

40.4 kB

Total Files

9

Last publish

Collaborators

  • der_googler