How to use the didyoumean2.default function in didyoumean2

To help you get started, we’ve selected a few didyoumean2 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 seek-oss / sku / context / validateConfig.js View on Github external
.forEach(key => {
      const unknownMessage = `Unknown key '${bold(key)}'.`;
      const suggestedKey = didYouMean(key, availableConfigKeys);
      const suggestedMessage = suggestedKey
        ? ` Did you mean '${bold(suggestedKey)}'?`
        : '';
      errors.push(`:question: ${unknownMessage}${suggestedMessage}`);
    });

didyoumean2

a library for matching human-quality input to a list of potential matches using the Levenshtein distance algorithm

MIT
Latest version published 3 months ago

Package Health Score

74 / 100
Full package analysis