JSPM

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

Get the path to an app (macOS)

Package Exports

  • app-path

Readme

app-path

Get the path to an app (macOS)

Install

$ npm install app-path

Usage

import appPath from 'app-path';

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 operating system than macOS.

appPath.sync(appName)

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

appName

Type: string

An app name or bundle identifier.