MCPcopy Index your code
hub / github.com/effector/effector / validateSampleConfig

Function validateSampleConfig

src/effector/sample.ts:33–42  ·  view source on GitHub ↗
(config: any, method: string)

Source from the content-addressed store, hash-verified

31 method + `: ${field} should be defined`
32
33export function validateSampleConfig(config: any, method: string) {
34 let atLeastOneFieldExists = false
35 forEach(sampleConfigFields, field => {
36 if (field in config) {
37 assert(config[field] != null, fieldErrorMessage(method, field))
38 atLeastOneFieldExists = true
39 }
40 })
41 return atLeastOneFieldExists
42}
43
44export function sample(...args: any[]) {
45 let target

Callers 2

guardFunction · 0.90
sampleFunction · 0.85

Calls 3

forEachFunction · 0.90
assertFunction · 0.90
fieldErrorMessageFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…