Skip to content

Commit

Permalink
Merge aa22249 into 475fcf3
Browse files Browse the repository at this point in the history
  • Loading branch information
gjuchault committed Jul 28, 2016
2 parents 475fcf3 + aa22249 commit abc547e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
16 changes: 16 additions & 0 deletions fuzzy.d.ts
@@ -0,0 +1,16 @@
export interface FuzzyOptions {
caseSensitive?: boolean;
before?: string;
after?: string;
}

export interface FuzzyResult {
score: number;
result: string;
}

declare function test(pattern: string, str: string, caseSensitive?: boolean): boolean;
declare function match(pattern: string, str: string, options?: FuzzyOptions): FuzzyResult;
declare function filter(pattern: string, strs: Array<string>, options?: FuzzyOptions): Array<string>;

export { test, match, filter };
8 changes: 6 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "fuzzyjs",
"version": "2.0.0",
"version": "2.1.0",
"description": "fuzzyjs is a fuzzy search algorithm in javascript",
"main": "build/fuzzy.js",
"directories": {
Expand Down Expand Up @@ -37,5 +37,9 @@
"bugs": {
"url": "https://github.com/gjuchault/fuzzyjs/issues"
},
"homepage": "https://github.com/gjuchault/fuzzyjs#readme"
"homepage": "https://github.com/gjuchault/fuzzyjs#readme",
"typings": "./fuzzy.d.ts",
"typescript": {
"definition": "./fuzzy.d.ts"
}
}

0 comments on commit abc547e

Please sign in to comment.