サブスタック/靴のサンプルコード、特にブラウザ側でのノードストリームアウトを調査しています:
https://github.com/substack/shoe/blob/master/example/invert/client.js
stream.pipe(through(function (msg) {
result.appendChild(document.createTextNode(msg));
this.queue(String(Number(msg)^1));
})).pipe(stream);
私は何を理解しています
result.appendChild(document.createTextNode(msg));
しますが、私はちょうど何を理解することはできません
this.queue(String(Number(msg) ^ 1));
と一緒に行います
.pipe(stream)
queue
そして.pipe(stream)
、ストリーム制御のために私にとって少し意味のあるストリームに戻りますString(Number(msg) ^ 1)
が、私は何も知りません。なに ^ 1)
??