Javascript module to traverse objects asynchronously