@cjser/shortcut-url
v4.0.0-cjser.2
Published
Get the URL from a web shortcut file
Downloads
24
Maintainers
Readme
shortcut-url
Get the URL from a web shortcut file
Install
$ npm install shortcut-urlUsage
import shortcutUrl from 'shortcut-url';
console.log(await shortcutUrl('google'));
//=> 'https://google.com'In the above example it will look for the following file:
- macOS:
google.webloc - Linux:
google.desktop - Windows:
google.url
API
shortcutUrl(filePath)
Returns Promise<string> with the URL.
filePath
Type: string
The file path to the web shortcut.
Leave out the extension for cross-platform compatibility.
Related
- shortcut-url-cli - CLI for this module
- open-shortcut - Open 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/shortcut-url
