This repository was archived by the owner on Sep 30, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1414 "author" : " shamb0t" ,
1515 "license" : " MIT" ,
1616 "dependencies" : {
17- "orbit-db-store" : " ~2.7 .0" ,
17+ "orbit-db-store" : " ~3.0 .0" ,
1818 "p-map" : " ~1.1.1"
1919 },
2020 "devDependencies" : {},
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ class DocumentStore extends Store {
2929 }
3030 const mapper = e => this . _index . get ( e )
3131 const filter = e => caseSensitive
32- ? e . indexOf ( key ) !== - 1
32+ ? e . indexOf ( key ) !== - 1
3333 : search ( e )
3434
3535 return Object . keys ( this . _index . _index )
@@ -64,27 +64,27 @@ class DocumentStore extends Store {
6464 . then ( ( ) => this . saveSnapshot ( ) )
6565 }
6666
67- put ( doc ) {
67+ put ( doc , options = { } ) {
6868 if ( ! doc [ this . options . indexBy ] )
6969 throw new Error ( `The provided document doesn't contain field '${ this . options . indexBy } '` )
7070
7171 return this . _addOperation ( {
7272 op : 'PUT' ,
7373 key : doc [ this . options . indexBy ] ,
7474 value : doc
75- } )
75+ } , options )
7676 }
7777
78- del ( key ) {
78+ del ( key , options = { } ) {
7979 if ( ! this . _index . get ( key ) )
8080 throw new Error ( `No entry with key '${ key } ' in the database` )
8181
8282 return this . _addOperation ( {
8383 op : 'DEL' ,
8484 key : key ,
8585 value : null
86- } )
86+ } , options )
8787 }
8888}
8989
90- module . exports = DocumentStore
90+ module . exports = DocumentStore
You can’t perform that action at this time.
0 commit comments