some tweaks...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2014-12-31 19:18:03 +03:00
parent f482dcb37b
commit 2ceadcf68a
2 changed files with 8 additions and 1 deletions

View File

@ -130,12 +130,17 @@ function loadJSON(path){
// - error <err> - an error occurred...
//
//
// NOTE: this is fairly generic and does not care about the type of data
// or it's format as long as it's JSON and the file names comply
// with the scheme above...
//
// XXX add support for sharding...
// XXX test with:
// requirejs(['file'],
// function(m){
// f = m.loadIndex("L:/mnt/hdd15 (photo)/NTFS1/media/img/others") })
// .done(function(d){ console.log(d) })
// XXX need to do better error handling...
// XXX need to do better error handling -- stop when an error is not recoverable...
// XXX a bit overcomplicated (???), see if this can be split into more generic
// sections...
var loadIndex =

View File

@ -607,6 +607,8 @@ module.ImagesPrototype = {
}
return this
},
// XXX this is really odd: renaming this to 'toJSON' breaks JavasCript
// making chrome/node just say: "<error>" and a filename...
dumpJSON: function(data){
return JSON.parse(JSON.stringify(this))
},