UNPKG

skypager-project

Version:
11 lines (9 loc) 225 B
export default function selector(existing, id, handler) { if(!id || typeof handler !== 'function') { return existing } return { ...(existing || {}), [id]: handler.bind ? handler.bind(this) : handler, } }