@dlghq/dialog-node-client
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "@dlghq/dialog-node-client", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"main": "src/index.js", | ||
@@ -5,0 +5,0 @@ "author": "Nikita Gusakov <gusnkt@gmail.com>", |
@@ -8,2 +8,3 @@ const patchScope = require('./patch-scope'); | ||
const createCore = require('@dlghq/dialog-java-core'); | ||
const AsyncStorage = require('./AsyncStorage'); | ||
@@ -13,2 +14,3 @@ return new Promise((resolve) => { | ||
endpoints, | ||
asyncStorage: new AsyncStorage(window.localStorage), | ||
customAppName: 'Dialog Test', | ||
@@ -15,0 +17,0 @@ apiAppName: 'Dialog Test App', |
@@ -25,3 +25,7 @@ const fs = require('fs'); | ||
} | ||
setJSONItem(key, value, replacer) { | ||
this.setItem(key, JSON.stringify(value, replacer)); | ||
} | ||
getItem(key) { | ||
@@ -31,2 +35,6 @@ return this.storage[key] || null; | ||
getJSONItem(key, reviver) { | ||
return JSON.parse(this.getItem(key), reviver); | ||
} | ||
clear() { | ||
@@ -33,0 +41,0 @@ this.storage = {}; |
10604
12
345