diff --git a/src/util/jsondb.js b/src/util/jsondb.js deleted file mode 100644 index 1aaa5bb..0000000 --- a/src/util/jsondb.js +++ /dev/null @@ -1,4 +0,0 @@ - -function jsondb(){ - -} diff --git a/src/util/resource.js b/src/util/resource.js deleted file mode 100644 index ce9edee..0000000 --- a/src/util/resource.js +++ /dev/null @@ -1,39 +0,0 @@ -// a resource is represent -var saveFile = require('save-file'); - -// filename should be a absolute -function Resource(){ - this.store = store || {}; -} - -var ro = Resource.prototype; - -ro.sync = function(){ - try{ - var source = JSON.stringify(this.json); - saveFile(filename, source); - }catch(e){ - - } -} - -ro.add = sync(function(){ - -}) - -ro.del = sync(function(){ - -}) - - -ro.update = sync(function(){ - -}) - - -function sync(fn){ - return function(){ - fn.apply(this, arguments); - this.sync(); - } -}