@macpaw/browser-deeplink
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -22,6 +22,7 @@ 'use strict'; | ||
function browserDeeplink(appLink, options) { | ||
if ( options === void 0 ) options = {}; | ||
if ( options === void 0 ) options = { | ||
waitTimeout: 200, | ||
}; | ||
var waitTimeout = options.waitTimeout; | ||
var WAIT_TIMEOUT = typeof (waitTimeout) === 'number' ? options.wait : 200; | ||
@@ -34,3 +35,3 @@ return new Promise((function (resolve, reject) { | ||
reject(Error(("Can't open " + appLink))); | ||
}, WAIT_TIMEOUT); | ||
}, waitTimeout); | ||
@@ -37,0 +38,0 @@ function windowBlurListener() { |
{ | ||
"name": "@macpaw/browser-deeplink", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "module": "src/index", |
declare module '@macpaw/browser-deeplink' { | ||
export function browserDeeplink(appLink : string): Promise<void>; | ||
export function browserDeeplink(appLink : string, options: { | ||
waitTimeout?: number | ||
}): Promise<void>; | ||
} |
@@ -17,5 +17,6 @@ function injectIframe(src) { | ||
export function browserDeeplink(appLink, options = {}) { | ||
export function browserDeeplink(appLink, options = { | ||
waitTimeout: 200, | ||
}) { | ||
const { waitTimeout } = options; | ||
const WAIT_TIMEOUT = typeof (waitTimeout) === 'number' ? options.wait : 200; | ||
@@ -28,3 +29,3 @@ return new Promise(((resolve, reject) => { | ||
reject(Error(`Can't open ${appLink}`)); | ||
}, WAIT_TIMEOUT); | ||
}, waitTimeout); | ||
@@ -31,0 +32,0 @@ function windowBlurListener() { |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
75
0
3266