maliut / open-with-result

Open stuff like URLs, files, executables. Cross-platform.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

forked from sindresorhus/open. Throw an error when open fails

for example:

try {
  await open('http://xx', { app: { name: open.apps.edge } })
} catch (e) {
  console.error(e)
}

will throw:

Unable to find application named 'microsoft edge'

if edge does not exist

About

Open stuff like URLs, files, executables. Cross-platform.

License:MIT License


Languages

Language:JavaScript 95.1%Language:TypeScript 4.9%