JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 54
  • Score
    100M100P100Q65964F
  • License MIT

Attempts to open the browser with a given URL. On Mac OS X, attempts to reuse an existing Chrome tab via AppleScript.

Package Exports

  • open-browsers
  • open-browsers/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (open-browsers) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Open Browsers

Buy me a coffee CI npm version NPM Downloads

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!');
}

Contributors

As always, thanks to our amazing contributors!

小弟调调 Tom Lynch kyriiherman

Made with contributors.

License

open-browsers is open source software licensed as MIT.