mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(cloudcmd) store -> fullstore
This commit is contained in:
parent
60fe5b600e
commit
ce73cbfbe7
6 changed files with 3 additions and 41 deletions
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
const Format = require('format-io');
|
||||
const currify = require('currify/legacy');
|
||||
const store = require('fullstore/legacy');
|
||||
const squad = require('squad');
|
||||
const exec = require('execon');
|
||||
const store = require('../../common/store');
|
||||
|
||||
const call = currify((fn, callback) => {
|
||||
fn();
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = require('../server/common/store');
|
||||
|
||||
|
|
@ -165,6 +165,7 @@
|
|||
"es6-promise": "^4.0.5",
|
||||
"es6-promisify": "^5.0.0",
|
||||
"eslint": "^3.1.1",
|
||||
"fullstore": "^1.0.0",
|
||||
"gunzip-maybe": "^1.3.1",
|
||||
"html-looks-like": "^1.0.2",
|
||||
"jscs": "^3.0.1",
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
'use strict';
|
||||
|
||||
const rendy = require('rendy');
|
||||
const store = require('fullstore/legacy');
|
||||
const Entity = require('./common/entity');
|
||||
const store = require('./common/store');
|
||||
|
||||
/* КОНСТАНТЫ (общие для клиента и сервера)*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = () => {
|
||||
const data = {};
|
||||
|
||||
return (value) => {
|
||||
if (typeof value !== 'undefined')
|
||||
data.value = value;
|
||||
|
||||
return data.value;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const dir = '../../common';
|
||||
const store = require(`${dir}/store`);
|
||||
const test = require('tape');
|
||||
|
||||
test('cloudcmd: common: store: set', (t) => {
|
||||
const name = store();
|
||||
const str = 'hello';
|
||||
name(str);
|
||||
|
||||
t.equal(name(), str, 'should return stored value');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('cloudcmd: common: store: first get', (t) => {
|
||||
const name = store();
|
||||
|
||||
t.equal(name(), undefined, 'should return undefined');
|
||||
t.end();
|
||||
});
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue