How to use the capture-website.buffer function in capture-website

To help you get started, we’ve selected a few capture-website examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sindresorhus / capture-website-cli / cli.js View on Github external
}

	if (!input) {
		input = await getStdin();
		options.inputType = 'html';
	}

	if (!input) {
		console.error('Please specify a URL, file path or HTML');
		process.exit(1);
	}

	if (output) {
		await captureWebsite.file(input, output, options);
	} else {
		process.stdout.write(await captureWebsite.buffer(input, options));
	}
})();

capture-website

Capture screenshots of websites

MIT
Latest version published 6 months ago

Package Health Score

71 / 100
Full package analysis