UNPKG

omim

Version:

Material Design for Omi.

17 lines (15 loc) 316 B
export function extract(props, prop) { if (typeof prop === 'string') { if (props.hasOwnProperty(prop)) { return { [prop]: props[prop] } } } else { const res = {} prop.forEach(key => { if (props.hasOwnProperty(key)) { res[key] = props[key] } }) return res } }