0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00

refactor: use Array.includes

This commit is contained in:
jamesgeorge007 2019-12-18 08:31:58 +05:30 committed by Conduitry
parent a9065d4120
commit 6a5e1d5033

View File

@ -33,7 +33,7 @@ function validate_options(options: CompileOptions, warnings: Warning[]) {
const { name, filename, loopGuardTimeout, dev } = options;
Object.keys(options).forEach(key => {
if (valid_options.indexOf(key) === -1) {
if (!valid_options.includes(key)) {
const match = fuzzymatch(key, valid_options);
let message = `Unrecognized option '${key}'`;
if (match) message += ` (did you mean '${match}'?)`;