get-puppeteer-browser
Get a singleton puppeteer browser instance.
Creating a puppeteer browser instance is very slow. It is usually better to reuse than to create each time.
Install
npm i get-puppeteer-browser
Example
const createBrowserGetter = const puppeteer = const getBrowser = ; async { const b1 = await const b2 = await console // => true await b1 // Not yet closed await b2 // Close now.}
API
createBrowserGetter(puppeteer[, launchOptions])
Create a getBrowser
function.
Debounce option
Debounce without closing immediately.
const getBrowser = ; async { const b1 = await b1 }
License
MIT