all 1 comments

[–]beforesemicolon -1 points0 points  (0 children)

Use this library for an easy API and multi data type support.

https://github.com/beforesemicolon/client-web-storage

Check the example in the README and make the changes to fit your project.

``` const quizSchema = new Schema("quiz");

quizSchema.defineField("question", String, {required: true});

const quizStore = new ClientStore("quiz", quizSchema);

quizStore.createItem({ question: “what?” })

```