From 683313409d0a4945b939aa1a192fdf0d411eb5e4 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 30 Sep 2019 10:28:52 +0200 Subject: [PATCH] setPersistence in bin/utils --- bin/utils.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/utils.js b/bin/utils.js index ea76c8c..8e93413 100644 --- a/bin/utils.js +++ b/bin/utils.js @@ -25,6 +25,14 @@ if (typeof persistenceDir === 'string') { persistence = new LevelDbPersistence(persistenceDir) } +/** + * @param {{bindState: function(string,WSSharedDoc):void, + * writeState:function(string,WSSharedDoc):Promise}|null} persistence_ + */ +export const setPersistence = persistence_ => { + persistence = persistence_ +} + /** * @type {Map} */