mirror of
https://github.com/jwetzell/osc-js.git
synced 2026-08-20 22:39:00 +00:00
eslint --fix
This commit is contained in:
@@ -12,7 +12,7 @@ export function bundleFromBuffer(bytes: Uint8Array): [OSCBundle | undefined, Uin
|
|||||||
}
|
}
|
||||||
|
|
||||||
const [bundleHeader, bytesAfterHeader] = oscTypeConverterMap.s.fromBuffer(bytes);
|
const [bundleHeader, bytesAfterHeader] = oscTypeConverterMap.s.fromBuffer(bytes);
|
||||||
let [timeTag, bytesAfterTimeTag] = oscTypeConverterMap.t.fromBuffer(bytesAfterHeader);
|
const [timeTag, bytesAfterTimeTag] = oscTypeConverterMap.t.fromBuffer(bytesAfterHeader);
|
||||||
|
|
||||||
if (!Array.isArray(timeTag)) {
|
if (!Array.isArray(timeTag)) {
|
||||||
throw new Error('problem getting bundle time tag');
|
throw new Error('problem getting bundle time tag');
|
||||||
@@ -26,7 +26,7 @@ export function bundleFromBuffer(bytes: Uint8Array): [OSCBundle | undefined, Uin
|
|||||||
let remainingBytes = bytesAfterTimeTag;
|
let remainingBytes = bytesAfterTimeTag;
|
||||||
|
|
||||||
while (!endOfBundle) {
|
while (!endOfBundle) {
|
||||||
let [contentSize, bytesAfterContentSize] = oscTypeConverterMap.i.fromBuffer(remainingBytes);
|
const [contentSize, bytesAfterContentSize] = oscTypeConverterMap.i.fromBuffer(remainingBytes);
|
||||||
|
|
||||||
if (typeof contentSize !== 'number') {
|
if (typeof contentSize !== 'number') {
|
||||||
throw new Error('problem decoding content size');
|
throw new Error('problem decoding content size');
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ export function messageFromBuffer(bytes: Uint8Array): [OSCMessage | undefined, U
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
let [typeString, bytesAfterType] = oscTypeConverterMap.s.fromBuffer(bytesAfterAddress);
|
const [typeString, bytesAfterType] = oscTypeConverterMap.s.fromBuffer(bytesAfterAddress);
|
||||||
if (typeof typeString === 'string') {
|
if (typeof typeString === 'string') {
|
||||||
if (!typeString.startsWith(',')) {
|
if (!typeString.startsWith(',')) {
|
||||||
throw new Error('osc type string must start with a ,');
|
throw new Error('osc type string must start with a ,');
|
||||||
|
|||||||
Reference in New Issue
Block a user