Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

better-opn

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

better-opn - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

23

dist/index.js

@@ -53,8 +53,9 @@ "use strict";

execSync('ps cax | grep "Google Chrome"');
execSync('osascript ../openChrome.applescript "' + encodeURI(url) + '"', {
execSync(`osascript ../openChrome.applescript "${encodeURI(url)}"`, {
cwd: __dirname,
stdio: 'ignore'
});
return true;
return Promise.resolve(true);
} catch (err) {// Ignore errors.
// It it breaks, it will fallback to `opn` anyway
}

@@ -73,16 +74,8 @@ } // Another special case: on OS X, check if BROWSER has been set to "open".

try {
const options = _objectSpread({
app: browser
}, opts);
const options = _objectSpread({
app: browser
}, opts);
console.debug(options);
require('opn')(url, options).catch(() => {}); // Prevent `unhandledRejection` error.
return true;
} catch (err) {
return false;
}
console.debug(options);
return require('opn')(url, options);
};

@@ -89,0 +82,0 @@

{
"name": "better-opn",
"version": "0.1.3",
"version": "0.1.4",
"description": "A better opn. Reuse the same tab on Chrome for 👨‍💻.",
"main": "dist/index.js",
"repository": "git@github.com:ExiaSR/better-opn.git",
"repository": {
"type": "git",
"url": "https://github.com/ExiaSR/better-opn"
},
"author": "Michael Lin <linzichunzf@hotmail.com>",

@@ -28,3 +31,5 @@ "license": "MIT",

"scripts": {
"build": "babel src -d dist"
"build": "babel src -d dist",
"lint": "eslint src --fix",
"format": "prettier --write \"src/**/*.js\""
},

@@ -38,5 +43,5 @@ "dependencies": {

"@babel/preset-env": "^7.2.0",
"eslint": "^5.2.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-prettier": "^2.6.2",
"eslint": "^5.10.0",
"eslint-config-prettier": "^3.3.0",
"eslint-plugin-prettier": "^3.0.0",
"opn": "^5.4.0",

@@ -43,0 +48,0 @@ "prettier": "^1.13.7"

@@ -7,11 +7,6 @@ # better-opn

`opn` is a peer dependency, make sure you install it as well.
> `$ yarn add better-opn`
```bash
yarn add opn better-opn
```
> `$ npm install better-opn`
```bash
npm install opn better-opn
```

@@ -30,2 +25,2 @@ ## Usage

- [Michael Lin](mailto:linzichunzf@hotmail.com)
- [Michael Lin](https://michaellin.me)

Sorry, the diff of this file is not supported yet

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