JSPM

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

Open a URL via the operating system (http: in default browser, mailto: in mail client etc.

Package Exports

  • openurl

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 (openurl) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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: