提交学习笔记专用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
480 B

  1. # default-browser-id
  2. > Get the [bundle identifier](https://developer.apple.com/library/Mac/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/plist/info/CFBundleIdentifier) of the default browser *(macOS)*\
  3. > Example: `com.apple.Safari`
  4. ## Install
  5. ```sh
  6. npm install default-browser-id
  7. ```
  8. ## Usage
  9. ```js
  10. import defaultBrowserId from 'default-browser-id';
  11. console.log(await defaultBrowserId());
  12. //=> 'com.apple.Safari'
  13. ```