import { Option , ValueType } from '../../types' ; const getSelectedOptions = ( flatOptions , value ? ) => { const valuesSet = new Set ( Array . isArray ( value ) ? value : [ value ] ) ; return flatOptions . filter ( option => valuesSet . has ( option . value ) ) ; } ; export default getSelectedOptions ;