UNPKG

@dr.pogodin/react-utils

Version:

Collection of generic ReactJS components and utils

3 lines 347 B
// The stuff common between different dropdown implementations. function isValue(x){const type=typeof x;return type==="number"||type==="string"}/** Returns option value and name as a tuple. */export function optionValueName(option){return isValue(option)?[option,option]:[option.value,option.name??option.value]} //# sourceMappingURL=common.js.map