UNPKG

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