Have ideas to improve npm?Join in the discussion! »

jasopTypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Jasop Travis CI Build Status

A window.open JavaScript wrapper.

NPM Badge

Install

npm install jasop

Usage

const jasop = require("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
        top: 100, // Options are polyfilled
        title: "MyWindow", // Custom window title
        replace: true // History behaviour
    }
)
// window.open("https://example.com", "MyWindow", "height=100,scrollbars=yes,width=200,top=100,screenY=100", true)

API

jasop(url, options?)

url

Type: string (url)

The URL to open.

options

Type: object

The options to use. Refer to MDN

Install

npm i jasop

DownloadsWeekly Downloads

4

Version

1.0.0

License

MIT

Unpacked Size

14.4 kB

Total Files

6

Last publish

Collaborators

  • avatar