recorder-audio-worklet
Version:
This module provides a loader for the RecorderAudioWorkletProcessor and the corresponding RecorderAudioWorkletNode.
8 lines • 351 B
JavaScript
export const validateState = (expectedStates, currentState) => {
if (!expectedStates.includes(currentState)) {
throw new Error(`Expected the state to be ${expectedStates
.map((expectedState) => `"${expectedState}"`)
.join(' or ')} but it was "${currentState}".`);
}
};
//# sourceMappingURL=validate-state.js.map