#Database Testing Method.
socket.on 'databaseTesting', ->
db.collection 'documents', (err, collection) ->
console.log 'Printing documents...'
console.log cursor.item for cursor in collection.find() when cursor.hasNext isnt false
console.log 'Documents printed.'
このコレクションの内容を、nodejslocalhostサーバーで実行されているmongoデータベースのコンソールに出力しようとしています。最初と最後のconsole.logは正常に表示されますが、カーソル自体は表示されません。そして、エラーはスローされません。何か案は?上記はCoffeeScriptです。