Skip to content

Commit

Permalink
Allow passing in a store
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechilds committed Jul 10, 2017
1 parent 1f73cf0 commit 32ae71d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
'use strict';

class Keyv {
constructor() {
this.store = new Map();
constructor(opts) {
opts = opts || {};
this.store = opts.store || new Map();
}

get(key) {
Expand Down

0 comments on commit 32ae71d

Please sign in to comment.