INNER CODE UNIT · JavaScript

invalidOptions

sindresorhus/meow · source/options.js:71

			const invalidOptions = optionEntries.filter(option => filter(option));
			const invalidOptionKeys = invalidOptions.map(([key]) => key);

			if (invalidOptions.length > 0) {
				errorMessages.push(message(invalidOptionKeys));
			}
		}
	}

	if (errorMessages.length > 0) {
		throw new Error(errorMessages.join('\n'));
	}
};

export const buildOptions = (helpText, options) => {
	if (typeof helpText !== 'string') {
		options = helpText;
		helpText = '';

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…