MCPcopy Index your code
hub / github.com/FlowiseAI/Flowise / parseValue

Function parseValue

packages/ui/src/ui-component/picker/WeekDaysPicker.jsx:20–29  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

18 const days = options?.length ? options.map((o) => ({ label: o.label, value: o.name })) : DEFAULT_DAYS
19
20 const parseValue = (val) => {
21 if (!val) return []
22 if (Array.isArray(val)) return val
23 if (typeof val === 'string')
24 return val
25 .split(',')
26 .map((token) => token.trim())
27 .filter(Boolean)
28 return []
29 }
30
31 const [selected, setSelected] = useState(parseValue(value))
32

Callers 1

WeekDaysPickerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected