adapt code, test and doc to latest dstore
fix jshint in test