@tanstack/match-sorter-utils
Advanced tools
Comparing version 8.0.12 to 8.0.13
@@ -13,7 +13,7 @@ { | ||
{ | ||
"uid": "e169-229", | ||
"uid": "75ae-229", | ||
"name": "remove-accents.ts" | ||
}, | ||
{ | ||
"uid": "e169-231", | ||
"uid": "75ae-231", | ||
"name": "index.ts" | ||
@@ -29,20 +29,20 @@ } | ||
"nodeParts": { | ||
"e169-229": { | ||
"75ae-229": { | ||
"renderedLength": 5602, | ||
"gzipLength": 1577, | ||
"brotliLength": 0, | ||
"mainUid": "e169-228" | ||
"mainUid": "75ae-228" | ||
}, | ||
"e169-231": { | ||
"75ae-231": { | ||
"renderedLength": 9521, | ||
"gzipLength": 2802, | ||
"brotliLength": 0, | ||
"mainUid": "e169-230" | ||
"mainUid": "75ae-230" | ||
} | ||
}, | ||
"nodeMetas": { | ||
"e169-228": { | ||
"75ae-228": { | ||
"id": "/packages/match-sorter-utils/src/remove-accents.ts", | ||
"moduleParts": { | ||
"index.production.js": "e169-229" | ||
"index.production.js": "75ae-229" | ||
}, | ||
@@ -52,14 +52,14 @@ "imported": [], | ||
{ | ||
"uid": "e169-230" | ||
"uid": "75ae-230" | ||
} | ||
] | ||
}, | ||
"e169-230": { | ||
"75ae-230": { | ||
"id": "/packages/match-sorter-utils/src/index.ts", | ||
"moduleParts": { | ||
"index.production.js": "e169-231" | ||
"index.production.js": "75ae-231" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "e169-228" | ||
"uid": "75ae-228" | ||
} | ||
@@ -66,0 +66,0 @@ ], |
/** | ||
* match-sorter-utils | ||
* | ||
* Copyright (c) TanStack | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE.md file in the root directory of this source tree. | ||
* | ||
* @license MIT | ||
*/ | ||
/** | ||
* @name match-sorter | ||
@@ -7,3 +17,3 @@ * @license MIT license. | ||
*/ | ||
export declare type AccessorAttributes = { | ||
declare type AccessorAttributes = { | ||
threshold?: Ranking; | ||
@@ -13,3 +23,3 @@ maxRanking: Ranking; | ||
}; | ||
export interface RankingInfo { | ||
interface RankingInfo { | ||
rankedValue: any; | ||
@@ -21,3 +31,3 @@ rank: Ranking; | ||
} | ||
export interface AccessorOptions<TItem> { | ||
interface AccessorOptions<TItem> { | ||
accessor: AccessorFn<TItem>; | ||
@@ -28,5 +38,5 @@ threshold?: Ranking; | ||
} | ||
export declare type AccessorFn<TItem> = (item: TItem) => string | Array<string>; | ||
export declare type Accessor<TItem> = AccessorFn<TItem> | AccessorOptions<TItem>; | ||
export interface RankItemOptions<TItem = unknown> { | ||
declare type AccessorFn<TItem> = (item: TItem) => string | Array<string>; | ||
declare type Accessor<TItem> = AccessorFn<TItem> | AccessorOptions<TItem>; | ||
interface RankItemOptions<TItem = unknown> { | ||
accessors?: ReadonlyArray<Accessor<TItem>>; | ||
@@ -36,3 +46,3 @@ threshold?: Ranking; | ||
} | ||
export declare const rankings: { | ||
declare const rankings: { | ||
readonly CASE_SENSITIVE_EQUAL: 7; | ||
@@ -47,3 +57,3 @@ readonly EQUAL: 6; | ||
}; | ||
export declare type Ranking = typeof rankings[keyof typeof rankings]; | ||
declare type Ranking = typeof rankings[keyof typeof rankings]; | ||
/** | ||
@@ -57,3 +67,3 @@ * Gets the highest ranking for value for the given item based on its values for the given keys | ||
*/ | ||
export declare function rankItem<TItem>(item: TItem, value: string, options?: RankItemOptions<TItem>): RankingInfo; | ||
declare function rankItem<TItem>(item: TItem, value: string, options?: RankItemOptions<TItem>): RankingInfo; | ||
/** | ||
@@ -65,2 +75,4 @@ * Sorts items that have a rank, index, and accessorIndex | ||
*/ | ||
export declare function compareItems<TItem>(a: RankingInfo, b: RankingInfo): number; | ||
declare function compareItems<TItem>(a: RankingInfo, b: RankingInfo): number; | ||
export { Accessor, AccessorAttributes, AccessorFn, AccessorOptions, RankItemOptions, Ranking, RankingInfo, compareItems, rankItem, rankings }; |
@@ -7,3 +7,3 @@ { | ||
], | ||
"version": "8.0.12", | ||
"version": "8.0.13", | ||
"description": "A fork of match-sorter with separated filtering and sorting phases", | ||
@@ -10,0 +10,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
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
315687
2986
16