MCPcopy
hub / github.com/andremichelle/openDAW / create

Function create

packages/lib/std/src/value-guides.ts:27–40  ·  view source on GitHub ↗
(option?: Options)

Source from the content-addressed store, hash-verified

25 }
26
27 export const create = (option?: Options): ValueGuide => {
28 if (isDefined(option)) {
29 if (isDefined(option?.snap)) {
30 return ValueGuide.snap(
31 option?.trackLength, option?.snap?.snapLength, Array.isArray(option?.snap?.threshold)
32 ? option?.snap.threshold
33 : [option?.snap?.threshold])
34 } else {
35 return ValueGuide.identity(option?.trackLength)
36 }
37 } else {
38 return ValueGuide.identity()
39 }
40 }
41
42 export const snap = (
43 trackLength: number = DEFAULT_TRACK_LENGTH,

Callers

nothing calls this directly

Calls 2

isDefinedFunction · 0.90
identityMethod · 0.80

Tested by

no test coverage detected