Testing Blogging Page
did is a library for matching human-quality input to a list of potential matches using the Levenshtein distance algorithm.
It is inspired by did.
Very Long Long Long Long Long Long Long Long Long Long Long
Based on LEVEN, the fastest JS implementation of the Levenshtein distance algorithm
~100% faster than did
Well tested with 100% coverage
Static type checking with TypeScript
More control on what kind of matches you want to return
Support matching object's
pathinstead of justkey
Installation
npm install didyoumean2const didYouMean = require('didyoumean2').default
// or if you are using TypeScript or ES module
import didYouMean from 'didyoumean2'
// you can also access to Enums via:
const {
default: didYouMean,
ReturnTypeEnums,
ThresholdTypeEnums,
} = require('didyoumean2')
// or
import didYouMean, { ReturnTypeEnums, ThresholdTypeEnums } from 'didyoumean2'
const a = async () => {
return <div {...span} />
}
export function* gen() {}Usage
didYouMean(input, matchList[, options])input {string}: A string that you are not sure and want to match withmatchListmatchList {Object[]|string[]}: A List for matching withinputoptions {Object}(optional): An options that allows you to modify the behavior@return {Array|null|Object|string}: A list of or single matched result(s), return object ifmatchis{Object[]}
Test
Before all:
npm install -g yarn
yarn installUnit test and coverage:
yarn testLinter:
yarn lint