open-one-window
v1.0.1
Published
Open the only one window
Downloads
4
Maintainers
Readme
open-one-window
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
Parameters
options
{{}}options.window
{Window} (optional, defaultglobal
)options.shouldFallback
Fallback the way when the browser is not chrome, It's will open every times whenfalse
(optional, defaulttrue
)
Returns Window
Contributing
- Fork it!
- Create your new branch:
git checkout -b feature-new
orgit 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)'
orgit 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, [email protected].
License
MIT - imcuttle 🐟