@cjser/open-shortcut
v4.0.0-cjser.2
Published
Open the URL from a web shortcut file in the browser
Downloads
13
Maintainers
Readme
open-shortcut
Open the URL from a web shortcut file in the browser
Install
npm install open-shortcutUsage
import openShortcut from 'open-shortcut';
await openShortcut('google');
console.log('URL opened in the browser');In the above example it will look for the following file:
- macOS:
google.webloc - Linux:
google.desktop - Windows:
google.url
API
openShortcut(filePath)
Returns a Promise for the child process and resolves when the shortcut has opened.
filePath
Type: string
The file path to the web shortcut.
Leave out the extension for cross-platform compatibility.
Related
- open-shortcut-cli - CLI for this module
- shortcut-url - Get the URL from a web shortcut file
cjser
This package is a CommonJS-compatible build generated by cjser for projects that still need require() support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.
Original repository: https://github.com/sindresorhus/open-shortcut
