UNPKG

305 BJavaScriptView Raw
1const defaultOptionStringifier = option => {
2 const {
3 label,
4 value
5 } = option;
6 if (typeof label === 'string') {
7 return label;
8 }
9 if (typeof value === 'string') {
10 return value;
11 }
12
13 // Fallback string representation
14 return String(option);
15};
16export { defaultOptionStringifier };
\No newline at end of file