diff options
Diffstat (limited to 'deps/node/deps/npm/lib/utils/did-you-mean.js')
-rw-r--r-- | deps/node/deps/npm/lib/utils/did-you-mean.js | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/deps/node/deps/npm/lib/utils/did-you-mean.js b/deps/node/deps/npm/lib/utils/did-you-mean.js deleted file mode 100644 index 479f0475..00000000 --- a/deps/node/deps/npm/lib/utils/did-you-mean.js +++ /dev/null @@ -1,17 +0,0 @@ -var meant = require('meant') - -function didYouMean (scmd, commands) { - var bestSimilarity = meant(scmd, commands).map(function (str) { - return ' ' + str - }) - - if (bestSimilarity.length === 0) return '' - if (bestSimilarity.length === 1) { - return '\nDid you mean this?\n' + bestSimilarity[0] - } else { - return ['\nDid you mean one of these?'] - .concat(bestSimilarity.slice(0, 3)).join('\n') - } -} - -module.exports = didYouMean |