Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports.REPLACE_WITH_EXPORT_NAME = function ensureHeadlessChrome (event, context, callback) {
(typeof launch === 'function' ? launch : launch.default)(options)
.then((instance) => {
handler.REPLACE_WITH_EXPORT_NAME(event, context, callback, instance)
})
.catch((error) => {
console.error(
'Error occured in serverless-plugin-chrome wrapper when trying to ' +
'ensure Chrome for REPLACE_WITH_EXPORT_NAME() handler.',
options,
error
)
})
}