INNER CODE UNIT · JavaScript

generate

danburzo/percollate · index.js:604

async function generate(fn, urls, options = {}) {
	if (!configured) {
		configure();
	}
	if (!urls.length) {
		return null;
	}
	let w = options.wait * 1000;
	if (options.debug && w) {
		if (Number.isFinite(w) && w >= 0) {
			err.write(
				`Processing URLs sequentially, waiting ${options.wait} seconds in-between.\n`
			);
		} else {
			err.write(
				`Invalid --wait: expecting positive number, got ${options.wait}. Processing URLs in parallel.\n`
			);
		}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…