Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

opener

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Issues
File Explorer

Advanced tools

opener

Opens stuff, like webpages and files and executables, cross-platform

    1.5.2latest

Version published
Maintainers
1
Weekly downloads
6,862,994
decreased by-11.38%

Weekly downloads

Changelog

Source

1.5.2

Fix trying to open URLs with ^ in them on Windows. (@kevinbackhouse, #34)

Readme

Source

It Opens Stuff

That is, in your desktop environment. This will make actual windows pop up, with stuff in them:

npm install opener -g opener http://google.com opener ./my-file.txt opener firefox opener npm run lint

Also if you want to use it programmatically you can do that too:

var opener = require("opener"); opener("http://google.com"); opener("./my-file.txt"); opener("firefox"); opener("npm run lint");

Plus, it returns the child process created, so you can do things like let your script exit while the window stays open:

var editor = opener("documentation.odt"); editor.unref(); // These other unrefs may be necessary if your OS's opener process // exits before the process it started is complete. editor.stdin.unref(); editor.stdout.unref(); editor.stderr.unref();

Use It for Good

Like opening the user's browser with a test harness in your package's test script:

{ "scripts": { "test": "opener ./test/runner.html" }, "devDependencies": { "opener": "*" } }

Why

Because Windows has start, Macs have open, and *nix has xdg-open. At least according to some person on StackOverflow. And I like things that work on all three. Like Node.js. And Opener.

FAQs

What is opener?

Opens stuff, like webpages and files and executables, cross-platform

Is opener popular?

The npm package opener receives a total of 5,531,149 weekly downloads. As such, opener popularity was classified as popular.

Is opener well maintained?

We found that opener demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 29 Aug 2020

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc