JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 160727
  • Score
    100M100P100Q148475F
  • License MIT

Get the path to an app (macOS)

Package Exports

  • app-path

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (app-path) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

app-path Build Status

Get the path to an app (macOS)

Install

$ npm install app-path

Usage

const appPath = require('app-path');

(async () => {
    console.log(await appPath('Safari'));
    //=> '/Applications/Safari.app'

    console.log(await appPath('com.apple.Safari'));
    //=> '/Applications/Safari.app'
})();

console.log(appPath.sync('Safari'));
//=> '/Applications/Safari.app'

API

appPath(appName)

Returns a Promise<string> with the path to the app specified in appName. Rejects when run on any other OS than macOS.

appPath.sync(appName)

Returns the path to the app specified in appName. Throws when run on any other OS than macOS.

appName

Type: string

An app name or bundle identifier.

License

MIT © Sindre Sorhus