npm.io
1.0.2 • Published 3 years ago

open-with

Licence
MIT
Version
1.0.2
Deps
1
Size
6 kB
Vulns
0
Weekly
0
Install scriptsThis package runs scripts during installation (preinstall/install/postinstall)

OpenWith

Open files where you want them

Info

Opens a dialog window with the choice of application to open the file.

!! The dialog window opens only on Windows, on linux & darwin the file opens immediately.

Result:

Example code

const openWith = require('open-with');

const result = openWith.open(__dirname + '/index.js');
const openWith = require('open-with');
const path = require('path');

const result = openWith.open(path.join(__dirname, 'index.js'));

Keywords