Skip to content

imcuttle/open-one-window

Repository files navigation

open-one-window

Build status Test coverage NPM version NPM Downloads Prettier Conventional Commits

Open the only one window

Installation

npm install open-one-window
# or use yarn
yarn add open-one-window

Usage

const openOneWindow = require('open-one-window')
const oneWin = openOneWindow()

oneWin.open('http://example.com')

API

openOneWindow

index.js:7-7

Parameters

  • options {{}}
    • options.window {Window} (optional, default global)
    • options.shouldFallback Fallback the way when the browser is not chrome, It's will open every times when false (optional, default true)

Returns Window

Contributing

  • Fork it!
  • Create your new branch:
    git checkout -b feature-new or git checkout -b fix-which-bug
  • Start your magic work now
  • Make sure npm test passes
  • Commit your changes:
    git commit -am 'feat: some description (close #123)' or git commit -am 'fix: some description (fix #123)'
  • Push to the branch: git push
  • Submit a pull request :)

Authors

This library is written and maintained by imcuttle, moyuyc95@gmail.com.

License

MIT - imcuttle 🐟

About

Open the only one window

Resources

License

Stars

Watchers

Forks

Packages

No packages published