UNPKG

detox

Version:

E2E tests and automation for mobile

12 lines (9 loc) 199 B
async function safeAsync(fnOrValue) { if (typeof fnOrValue === 'function') { const fn = fnOrValue; return (await fn()); } else { return fnOrValue; } } module.exports = safeAsync;