Sign in
apache
/
pouchdb
/
refs/heads/extract-polyfills
/
.
/
packages
/
node_modules
/
pouchdb-adapter-idb
/
src
/
countDocs.js
blob: 111616aac888624d65cc74461babbef8a577120f [
file
] [
log
] [
blame
]
import
{
DOC_STORE
}
from
'./constants'
;
function
countDocs
(
txn
,
cb
)
{
var
index
=
txn
.
objectStore
(
DOC_STORE
).
index
(
'deletedOrLocal'
);
index
.
count
(
IDBKeyRange
.
only
(
'0'
)).
onsuccess
=
function
(
e
)
{
cb
(
e
.
target
.
result
);
};
}
export
default
countDocs
;