Javascript/Typescript encrypted data storage, using (possibly public) key/value databases

Michaël Lemaire b490f08862 Added node.js directory storage 6 days ago
src b490f08862 Added node.js directory storage 6 days ago
.editorconfig 340043beb7 Initial pre-version with only browser local storage 1 month ago
.gitignore 340043beb7 Initial pre-version with only browser local storage 1 month ago
.gitlab-ci.yml 340043beb7 Initial pre-version with only browser local storage 1 month ago
README.md b490f08862 Added node.js directory storage 6 days ago
activate_node b490f08862 Added node.js directory storage 6 days ago
jest.config.js b490f08862 Added node.js directory storage 6 days ago
package-lock.json b490f08862 Added node.js directory storage 6 days ago
package.json b490f08862 Added node.js directory storage 6 days ago
tsconfig.json b490f08862 Added node.js directory storage 6 days ago

README.md

tk-storage

pipeline status coverage report npm version npm size

About

Javascript/Typescript persistent storage, with key-value stores as foundation.

Typescript definitions are included.

Issues can be reported on GitLab.

Install

Import in node:

npm install tk-storage
import { getLocalStorage } from "tk-storage";
const storage = getLocalStorage("myapp");

Import in browser:

<script src="https://unpkg.com/tk-storage"></script>
const storage = tkStorage.getLocalStorage("myapp");

Use

const storage = getLocalStorage("myapp");
await storage.get("key");  // => null
await storage.set("key", "value");
await storage.get("key");  // => "value"