UNPKG

preact-material-components

Version:
14 lines (12 loc) 377 B
/** Copy own-properties from `props` onto `obj`. * @returns obj * @private */ export function extend(obj, props) { for (let i in props) obj[i] = props[i]; return obj; } /** Call a function asynchronously, as soon as possible. * @param {Function} callback */ export const defer = typeof Promise=='function' ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;