npm.io
1.1.2 • Published 7 years ago

external-link-new-tab

Licence
MIT
Version
1.1.2
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
3

Useful when you need to open external url in new tab.

window.open will normally open external links as Popups.

Install

$ npm install external-link-new-tab --save

Usage

import { openInNewTab } from 'external-link-new-tab';

openInNewTab("https://solankiamit.com")

API

options

Type: Object

timeout

Type: number
Default: 20

Number of milliseconds after which the new tab will open the link. (normally you won't have to change this. You have option to change it, because why not )

License

MIT Amit Solanki