@types/string-similarity
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -1,8 +0,1 @@ | ||
// Type definitions for string-similarity 4.0 | ||
// Project: https://github.com/aceakash/string-similarity#readme | ||
// Definitions by: ragtime <https://github.com/ragtime> | ||
// BendingBender <https://github.com/BendingBender> | ||
// Piotr Błażejewicz <https://github.com/peterblazejewicz> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
export as namespace stringSimilarity; | ||
@@ -9,0 +2,0 @@ |
{ | ||
"name": "@types/string-similarity", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "TypeScript definitions for string-similarity", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/string-similarity", | ||
"license": "MIT", | ||
@@ -9,14 +10,14 @@ "contributors": [ | ||
"name": "ragtime", | ||
"url": "https://github.com/ragtime", | ||
"githubUsername": "ragtime" | ||
"githubUsername": "ragtime", | ||
"url": "https://github.com/ragtime" | ||
}, | ||
{ | ||
"name": "BendingBender", | ||
"url": "https://github.com/BendingBender", | ||
"githubUsername": "BendingBender" | ||
"githubUsername": "BendingBender", | ||
"url": "https://github.com/BendingBender" | ||
}, | ||
{ | ||
"name": "Piotr Błażejewicz", | ||
"url": "https://github.com/peterblazejewicz", | ||
"githubUsername": "peterblazejewicz" | ||
"githubUsername": "peterblazejewicz", | ||
"url": "https://github.com/peterblazejewicz" | ||
} | ||
@@ -33,4 +34,4 @@ ], | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "4a1b4df2b81f7a59535ea72cd5a2d595d6e7fac63be6818f11b3b2ce0d684b1c", | ||
"typeScriptVersion": "3.2" | ||
"typesPublisherContentHash": "3bb6f106de9cfe5d3c96933997ca0f77df2f333a5d9b6d0a49a590b1090706f9", | ||
"typeScriptVersion": "4.5" | ||
} |
@@ -9,9 +9,44 @@ # Installation | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/string-similarity. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/string-similarity/index.d.ts) | ||
````ts | ||
export as namespace stringSimilarity; | ||
/** | ||
* Returns a fraction between 0 and 1, which indicates the degree of similarity between the two strings. | ||
* `0` indicates completely different strings, `1` indicates identical strings. The comparison is case-insensitive. | ||
* | ||
* @param string1 The first string | ||
* @param string2 The second string | ||
* @returns A fraction from 0 to 1, both inclusive. Higher number indicates more similarity. | ||
*/ | ||
export function compareTwoStrings(string1: string, string2: string): number; | ||
/** | ||
* Compares `mainString` against each string in `targetStrings`. | ||
* | ||
* @argument mainString: The string to match each target string against. | ||
* @argument targetStrings: Each string in this array will be matched against the main string. | ||
* @returns An object with a `ratings` property, which gives a similarity rating for each target string, | ||
* a `bestMatch` property, which specifies which target string was most similar to the main string, | ||
* and a `bestMatchIndex` property, which specifies the index of the `bestMatch` in the `targetStrings` array. | ||
*/ | ||
export function findBestMatch(mainString: string, targetStrings: string[]): BestMatch; | ||
export interface Rating { | ||
target: string; | ||
rating: number; | ||
} | ||
export interface BestMatch { | ||
ratings: Rating[]; | ||
bestMatch: Rating; | ||
bestMatchIndex: number; | ||
} | ||
```` | ||
### Additional Details | ||
* Last updated: Thu, 05 Nov 2020 21:47:43 GMT | ||
* Last updated: Wed, 18 Oct 2023 11:45:06 GMT | ||
* Dependencies: none | ||
* Global values: `stringSimilarity` | ||
# Credits | ||
These definitions were written by [ragtime](https://github.com/ragtime), [BendingBender](https://github.com/BendingBender), and [Piotr Błażejewicz](https://github.com/peterblazejewicz). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
5748
0
52
29