Home

Awesome

<div align = center>

Deno Opn

A port of OPN

<br> <br>

Badge LicenseBadge PortBadge Opn

<br> <br>

Usage

</div> <br>

Import

Latest

Use the bleeding edge.

import { open } from 'https://github.com/hashrock/deno-opn/raw/master/mod.ts'
Version

Use a specific Release tag.

import { open } from 'https://github.com/hashrock/deno-opn/raw/<Version Tag>/mod.ts'

v2.0.0

import { open } from 'https://github.com/hashrock/deno-opn/raw/v2.0.0/mod.ts'

v1.1.1(legacy)

import { opn } from 'https://github.com/hashrock/deno-opn/raw/v1.1.1/opn.ts'
<br>

File

Open a file with the default image viewer.

await open('unicorn.png');
<br>

URL

Open a URL in the default browser.

await open('http://sindresorhus.com');
<br>

With

Open the target with a specific program.

await open('http://sindresorhus.com',{ 
    with: [ 'firefox' ] 
});
<br>

Arguments

Supply the program with arguments.

await open('http://sindresorhus.com',{
    with: [ 'chrome' , '--incognito' ]
});
<br> <br> <div align = center>

Design

Internally system specific commands <br> are used to start the child processes.

<br>
SystemCommand
Badge Linuxgio open
Badge MacOSstart
Badge Windowsopen
<br> <br>

Contributions

PRs welcome :)

<br> </div> <!----------------------------------------------------------------------------->