openurl
Open a URL via the operating system (http: in default browser, mailto: in mail client etc.
Last updated 9 years ago by rauschma .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install openurl 
SYNC missed versions from official npm registry.

openurl – Node.js module for opening URLs

openurl is a Node.js module for opening a URL via the operating system. This will usually trigger actions such as:

  • http URLs: open the default browser
  • mailto URLs: open the default email client
  • file URLs: open a window showing the directory (on OS X)

Example interaction on the Node.js REPL:

> require("openurl").open("http://rauschma.de")
> require("openurl").open("mailto:john@example.com")

You can generate emails as follows:

require("openurl").mailto(["john@example.com", "jane@example.com"],
    { subject: "Hello!", body: "This is\nan automatically sent email!\n" });

Install via npm:

npm install openurl

I’m not yet terribly familiar with implementing npm packages, so any feedback is welcome (especially experience reports on Windows and Linux, which I can’t test on).

Related reading:

Current Tags

  • 1.1.1                                ...           latest (9 years ago)

5 Versions

  • 1.1.1                                ...           9 years ago
  • 1.1.0                                ...           13 years ago
  • 1.0.2                                ...           13 years ago
  • 1.0.1                                ...           13 years ago
  • 1.0.0                                ...           13 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE