openbrowser

1.0.2 • Public • Published

openbrowser(url: string): boolean

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 opn behavior.

var openbrowser = require('openbrowser');
 
openbrowser('http://localhost:3000');
 

/openbrowser/

    Package Sidebar

    Install

    npm i openbrowser

    Weekly Downloads

    42

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • zhangking