Mercurial > psgxs
diff storage.js @ 12:9a6b8b3357c6
Use new functions like console.log instead of sys.puts, and aerate a bit.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Fri, 27 Aug 2010 01:14:40 +0200 |
parents | 44889cfb2f8c |
children | f2e9365bc8ec |
line wrap: on
line diff
--- a/storage.js +++ b/storage.js @@ -17,7 +17,6 @@ * along with PSĜS. If not, see <http://www.gnu.org/licenses/>. */ -var sys = require('sys'); var sha1hex = require('sha1').hex; require('./iso8601'); var errors = require('./errors'); @@ -512,7 +511,7 @@ storage.save = function(file) { if (!file) file = 'save.json'; - fs.writeFile(file, sys.inspect(data, null, null)); + fs.writeFile(file, require('sys').inspect(data, null, null)); } storage.load = function(file) { @@ -556,5 +555,5 @@ storage.load = function(file) { } storage.debug = function() { - sys.puts('\033[1;33m' + sys.inspect(list, null, null) + '\033[0m'); + console.log('\033[1;33m' + require('sys').inspect(list, null, null) + '\033[0m'); };