default-browser-id
Advanced tools
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) { |
{ | ||
"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) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
53
1
2968
44
+ Addeduntildify@1.0.0(transitive)
+ Addeduser-home@1.1.1(transitive)
- Removeduntildify@0.1.0(transitive)
Updateduntildify@^1.0.0