Skip to content

Commit

Permalink
remove unused code, #38414
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Nov 15, 2017
1 parent 58e8d53 commit b486528
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/vs/base/common/filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,6 @@ export function or(...filter: IFilter[]): IFilter {
};
}

/**
* @returns A filter which combines the provided set
* of filters with an and. The combines matches are
* returned if *all* filters match.
*/
export function and(...filter: IFilter[]): IFilter {
return function (word: string, wordToMatchAgainst: string): IMatch[] {
let result: IMatch[] = [];
for (let i = 0, len = filter.length; i < len; i++) {
let match = filter[i](word, wordToMatchAgainst);
if (!match) {
return null;
}
result = result.concat(match);
}
return result;
};
}

// Prefix

export const matchesStrictPrefix: IFilter = _matchesPrefix.bind(undefined, false);
Expand Down Expand Up @@ -334,11 +315,6 @@ function nextWord(word: string, start: number): number {

// Fuzzy

export enum SubstringMatching {
Contiguous,
Separate
}

export const fuzzyContiguousFilter = or(matchesPrefix, matchesCamelCase, matchesContiguousSubString);
const fuzzySeparateFilter = or(matchesPrefix, matchesCamelCase, matchesSubString);
const fuzzyRegExpCache = new BoundedMap<RegExp>(10000); // bounded to 10000 elements
Expand Down

0 comments on commit b486528

Please sign in to comment.