open
open a file or url in the user's preferred application
Last updated 4 years ago by pwnall .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install open 
SYNC missed versions from official npm registry.

open

Open a file or url in the user's preferred application.

Usage

var open = require("open");
open("http://www.google.com");

open taks an optional argument specifying the program to be used to open the file or URL.

open("http://www.google.com", "firefox");

Installation

npm install open

How it works

  • on win32 uses start
  • on darwin uses open
  • otherwise uses the xdg-open script from freedesktop.org

Warning

The same care should be taken when calling open as if you were calling child_process.exec directly. If it is an executable it will run in a new shell.

Maintainers (2)
Downloads
Today 407
This Week 407
This Month 53,666
Last Day 1,168
Last Week 23,319
Last Month 110,197
Dependencies (0)
None
Dev Dependencies (1)
Dependents (2095)

Copyright 2014 - 2016 © taobao.org |