File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ couch-store.js: src/couch-store.js $(SRC)
20
20
memory-store.js : src/memory-store.js $(SRC )
21
21
$(BIN ) /rollup $< -c -f cjs > $@
22
22
23
+ empty-store.js : src/empty-store.js $(SRC )
24
+ $(BIN ) /rollup $< -c -f cjs > $@
25
+
23
26
test.js : test/index.js index.js couch-store.js memory-store.js $(TEST )
24
27
$(BIN ) /rollup $< -c -f cjs > $@
25
28
Original file line number Diff line number Diff line change
1
+ class EmptyStore {
2
+ constructor ( ) {
3
+ if ( process . env . NODE_ENV === "production" ) {
4
+ console . warn ( `Please don't use the empty session store in a production environment since it is very insecure.` ) ;
5
+ }
6
+ }
7
+
8
+ add ( ) { }
9
+ exists ( ) { return true ; }
10
+ remove ( ) { }
11
+ }
12
+
13
+ export default function createEmptyStore ( ) {
14
+ return new EmptyStore ( ) ;
15
+ }
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ export default function createApp(opts={}) {
31
31
let createSessionStore ;
32
32
if ( storeType === 'couch' ) {
33
33
createSessionStore = require ( './couch-store' ) ;
34
+ } else if ( storeType === 'empty' ) {
35
+ createSessionStore = require ( './empty-store' ) ;
34
36
} else if ( storeType === 'memory' || typeof storeType === 'undefined' ) {
35
37
createSessionStore = require ( './memory-store' ) ;
36
38
} else if ( typeof storeType === "string" ) {
You can’t perform that action at this time.
0 commit comments