samuk190 / localbase

A Firebase-Style Database ... Offline!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check if document or key/field exists

WriterStat opened this issue · comments

Hi! I'm new to indexdb and localbase, trying it out. So thanks for some great kit.

I have an existing vanilla javascript app.

How does someone check if a document or key/field exists? I want to add one if there isn't one, but don't want to write over an existing collection, document, or key/field if it exists.

get() seems to resolve true even if there isn't a document or key/field

Thanks!

Is there a different way to look at this? Do I need to reshape my thinking for this? Much thanks.

Closed due to no author response. Looked promising.