Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/azhar22k/ourl
Node.js Utility to open urls in browser
https://github.com/azhar22k/ourl
Last synced: 6 days ago
JSON representation
Node.js Utility to open urls in browser
- Host: GitHub
- URL: https://github.com/azhar22k/ourl
- Owner: azhar22k
- License: mit
- Created: 2018-07-22T17:06:37.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-04-28T05:12:50.000Z (6 months ago)
- Last Synced: 2024-10-28T02:35:49.168Z (11 days ago)
- Language: JavaScript
- Size: 58.6 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# out-url
Light Weight, Cross platform Node.js Utility to open urls in browser with zero dependencies[![NPM](https://nodei.co/npm/out-url.svg?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/out-url/)
[![CodeQL](https://github.com/azhar22k/ourl/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/azhar22k/ourl/actions/workflows/codeql-analysis.yml) ![](https://img.shields.io/npm/v/out-url) ![](https://img.shields.io/bundlephobia/minzip/out-url) ![](https://img.shields.io/bundlephobia/min/out-url) ![](https://img.shields.io/npm/dt/out-url) ![](https://img.shields.io/github/issues/azhar22k/ourl) ![](https://img.shields.io/github/issues-pr/azhar22k/ourl)
## Supported platforms
- Android
- Windows
- MacOS
- Linux### Example
```javascript
// Plain example
const { open } = require('out-url');
open('https://github.com/azhar22k');
//or
require('out-url').open('https://github.com/azhar22k');
``````javascript
// With error handling
const { open } = require('out-url');
open('https://github.com/azhar22k')
.then(res => console.log('RES', res)) // Resolves with Done!
.catch(err => console.log('ERR', err));
``````javascript
// Using async/await
const { open } = require('out-url');const foo = async () {
await open('https://github.com/azhar22k');
}
```