UNPKG

react-saasify-chrisvxd

Version:

React components for Saasify web clients.

15 lines (11 loc) 351 B
const opn = require('opn'); const openInBrowser = async (url, browser) => { try { const options = typeof browser === 'string' ? {app: browser} : undefined; await opn(url, options); } catch (err) { console.error(`Unexpected error while opening in browser: ${browser}`); console.error(err); } }; module.exports = openInBrowser;