0
Node.js中是否有一个函数可以读取流中的字符,直到它读取完整的JavaScript表达式并返回该表达式为止? read-eval-print循环的“read”部分?Node.js中的“读取”REPL
我想从流中读取JSON对象并在它们进来时处理它们。在本用例中,我不需要REPL的交互部分。
{"r": 0.0,
"e": -0.2,
"t": 0.98}
// callback happens here with the content of the object
{"r": 0.2,
"e": 0.0,
"t": 1.0}
// callback happens here with the content of the object
// etc