export default function selector(existing, id, handler) {
  if(!id || typeof handler !== 'function') {
    return existing
  }

  return {
    ...(existing || {}),
    [id]: handler.bind ? handler.bind(this) : handler,
  }
}
