@luchanso/browser-open

    1.1.1 • Public • Published

    browser-open

    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 path = require('path');
    var browserOpen = require('browser-open');
     
    if (browserOpen('http://localhost:3000')) {
      console.log('The browser tab has been opened!');
    }

    Keywords

    none

    Install

    npm i @luchanso/browser-open

    DownloadsWeekly Downloads

    4

    Version

    1.1.1

    License

    MIT

    Last publish

    Collaborators

    • avatar