Socket
Socket
Sign inDemoInstall

default-browser-id

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

default-browser-id - npm Package Compare versions

Comparing version 0.1.2 to 1.0.0

25

cli.js
#!/usr/bin/env node
'use strict';
var defaultBrowserId = require('./index');
var pkg = require('./package.json');
var defaultBrowserId = require('./');
var argv = process.argv.slice(2);
if (process.argv.indexOf('-h') !== -1 || process.argv.indexOf('--help') !== -1) {
return console.log('Usage\n default-browser-id\n\nExample output\n com.apple.Safari\n\nReturns the bundle identifier of the default browser');
function help() {
console.log([
'',
' ' + pkg.description,
'',
' Example',
' default-browser-id',
' com.apple.Safari'
].join('\n'));
}
if (process.argv.indexOf('-v') !== -1 || process.argv.indexOf('--version') !== -1) {
return console.log(require('./package').version);
if (argv.indexOf('--help') !== -1) {
help();
return;
}
if (argv.indexOf('--version') !== -1) {
console.log(pkg.version);
return;
}
defaultBrowserId(function (err, id) {

@@ -14,0 +29,0 @@ if (err) {

4

package.json
{
"name": "default-browser-id",
"version": "0.1.2",
"version": "1.0.0",
"description": "Get the bundle identifier of the default browser (OS X). Example: com.apple.Safari",

@@ -45,3 +45,3 @@ "license": "MIT",

"bplist-parser": "0.0.5",
"untildify": "^0.1.0"
"untildify": "^1.0.0"
},

@@ -48,0 +48,0 @@ "devDependencies": {

@@ -9,3 +9,3 @@ # default-browser-id [![Build Status](https://travis-ci.org/sindresorhus/default-browser-id.svg?branch=master)](https://travis-ci.org/sindresorhus/default-browser-id)

```bash
```sh
$ npm install --save default-browser-id

@@ -29,19 +29,17 @@ ```

You can also use it as a CLI app by installing it globally:
```bash
```sh
$ npm install --global default-browser-id
```
### Usage
```sh
$ default-browser-id --help
```bash
$ default-browser-id
Example
default-browser-id
com.apple.Safari
```
Which will for example output `com.apple.Safari`.
## License
[MIT](http://opensource.org/licenses/MIT) © [Sindre Sorhus](http://sindresorhus.com)
MIT © [Sindre Sorhus](http://sindresorhus.com)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc