Check how similar two strings are
import { string } from "@rjweb/utils"string.similarity('Hello', 'Hello') // 100string.similarity('Hello', 'Helo') // 80string.similarity('Hello', 'sadfasdf') // 0string.similarity('Hello', 'Hello World') // 50 Copy
import { string } from "@rjweb/utils"string.similarity('Hello', 'Hello') // 100string.similarity('Hello', 'Helo') // 80string.similarity('Hello', 'sadfasdf') // 0string.similarity('Hello', 'Hello World') // 50
1.12.10
nodejs, browser
Check how similar two strings are