open-browsers

1.3.0 • Public • Published

open-browsers

Attempts to open the browser with a given URL. On Mac OS X, attempts to reuse an existing Chrome tab via AppleScript. Otherwise, falls back to open behavior. open-browsers form react-dev-utils.

Install

npm install open-browsers --save-dev

Usage

openBrowsers(url: string): boolean

var openBrowsers = require('open-browsers');
if (openBrowsers('http://localhost:3000')) {
  console.log('The browser tab has been opened!');
}

License

open-browsers is open source software licensed as MIT.

Package Sidebar

Install

npm i open-browsers

Weekly Downloads

13

Version

1.3.0

License

MIT

Unpacked Size

9.23 kB

Total Files

5

Last publish

Collaborators

  • wcjiang