https://github.com/richienb/jasop
Human-friendly `window.open`.
https://github.com/richienb/jasop
browser javascript web
Last synced: 5 months ago
JSON representation
Human-friendly `window.open`.
- Host: GitHub
- URL: https://github.com/richienb/jasop
- Owner: Richienb
- License: mit
- Created: 2019-03-17T00:16:14.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-04-04T09:04:07.000Z (almost 4 years ago)
- Last Synced: 2025-07-06T11:40:13.382Z (6 months ago)
- Topics: browser, javascript, web
- Language: JavaScript
- Homepage: https://richienb.github.io/jasop
- Size: 466 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# jasop
Human-friendly `window.open`.
## Install
```sh
npm install jasop
```
## Usage
```js
import jasop from 'jasop';
jasop(
'https://example.com', // URL
{
height: 100, // You can use any window.open option
scrollbars: true, // Booleans will the parsed
width: 200, // Everything else will be converted to a string
}
);
// window.open('https://example.com', 'MyWindow', 'height=100,scrollbars=yes,width=200,top=100', true);
```
## API
### jasop(url, options?)
#### url
Type: `string | URL`
The URL to open.
#### options
Type: `object`
The options to use. Refer to [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#Window_features)