timing-provider
Version:
An implementation of the timing provider specification.
8 lines • 432 B
JavaScript
export const findSendPeerToPeerMessageFunction = (key, sendPeerToPeerMessageTuples) => {
const sendPeerToPeerMessageTuple = sendPeerToPeerMessageTuples.find(([clientId]) => clientId === key);
if (sendPeerToPeerMessageTuple === undefined) {
throw new Error('There is no tuple with the given key.');
}
return sendPeerToPeerMessageTuple[1];
};
//# sourceMappingURL=find-send-peer-to-peer-message-function.js.map