npm run format:write

This commit is contained in:
2024-10-13 16:43:32 -05:00
parent 278d09bb6f
commit 81e0a542c5
3 changed files with 12 additions and 11 deletions
+3 -5
View File
@@ -10,18 +10,16 @@ program.description('simple util to read osc packets from stdin');
program.action(() => {
process.stdin.on('data', (data) => {
try {
let remainingBytes = data
while(remainingBytes.length > 0){
let remainingBytes = data;
while (remainingBytes.length > 0) {
try {
const [message, bytesAfterMessage] = osc.messageFromBuffer(remainingBytes);
remainingBytes = bytesAfterMessage
remainingBytes = bytesAfterMessage;
console.log(JSON.stringify(message));
} catch (error) {
console.error({ error: error.toString() });
}
}
} catch (error) {
console.error({ error: error.toString() });
}