MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / sortDays

Function sortDays

packages/ui/src/ui-component/picker/MonthDaysPicker.jsx:24–29  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

22
23 // Sort numeric days ascending, keep "L" (last day) at the end.
24 const sortDays = (arr) =>
25 [...arr].sort((a, b) => {
26 if (a === LAST_DAY_TOKEN) return 1
27 if (b === LAST_DAY_TOKEN) return -1
28 return Number(a) - Number(b)
29 })
30
31 const [selected, setSelected] = useState(sortDays(parseValue(value)))
32

Callers 2

MonthDaysPickerFunction · 0.85
toggleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected