qwqdanchun.github.io/node_modules/openurl
qwqdanchun 1b6a0fbb18 test 2022-11-11 19:16:46 +08:00
..
.npmignore test 2022-11-11 19:16:46 +08:00
README.md test 2022-11-11 19:16:46 +08:00
openurl.js test 2022-11-11 19:16:46 +08:00
package.json test 2022-11-11 19:16:46 +08:00

README.md

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

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

Related reading: