MCPcopy
hub / github.com/Tonejs/Tone.js / assert

Function assert

Tone/core/util/Debug.ts:6–10  ·  view source on GitHub ↗
(statement: boolean, error: string)

Source from the content-addressed store, hash-verified

4 * @param error The message which is passed into an Error
5 */
6export function assert(statement: boolean, error: string): void {
7 if (!statement) {
8 throw new Error(error);
9 }
10}
11
12/**
13 * Make sure that the given value is within the range

Callers 15

decayCurveMethod · 0.90
triggerReleaseMethod · 0.90
typeMethod · 0.90
getFrequencyOfIndexMethod · 0.90
constructorMethod · 0.90
startMethod · 0.90
stopMethod · 0.90
pauseMethod · 0.90
typeMethod · 0.90
rolloffMethod · 0.90
typeMethod · 0.90
sliceMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected