Skip to content

Commit

Permalink
fix(index): make db a getter
Browse files Browse the repository at this point in the history
fixes #168.
  • Loading branch information
Terreii authored and gr2m committed Sep 7, 2018
1 parent a3f8f8f commit a0043e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ function Store (dbName, options) {
}

var api = {
db: state.db,
get db () {
return state.db
},
isPersistent: require('./lib/is-persistent').bind(null, state),
add: require('./lib/add').bind(null, state, null),
find: require('./lib/find').bind(null, state, null),
Expand Down

0 comments on commit a0043e6

Please sign in to comment.