MCPcopy Create free account

hub / github.com/kentcdodds/match-sorter / functions

Functions19 in github.com/kentcdodds/match-sorter

↓ 2 callersFunctionfindMatchingCharacter
( matchChar: string, string: string, index: number, )
src/index.ts:334
↓ 2 callersFunctiongetMatchRanking
* Gives a rankings score based on how well the two strings match. * @param {String} testString - the string to test against * @param {String} string
src/index.ts:209
↓ 2 callersFunctiongetRankedItems
( items: ReadonlyArray<ItemType>, value: string, options: MatchSorterOptions<ItemType>, )
src/index.ts:105
↓ 2 callersFunctionmatchSorterWithRankInfo
* Takes an array of items and a value and returns ranked items with metadata attached * @param {Array} items - the items to sort * @param {String} v
src/index.ts:97
↓ 2 callersFunctionprepareValueForComparison
* Prepares value for comparison by stringifying it, removing diacritics (if specified) * @param {String} value - the value to clean * @param {Object
src/index.ts:406
↓ 1 callersFunctiongetAcronym
* Generates an acronym for a string. * * Segment starts ︱ at the beginning of the phrase, after a **space**, or after a **hyphen**. * We capture th
src/index.ts:300
↓ 1 callersFunctiongetAllValuesToRank
* Gets all the values for the given keys in the given item and returns an array of those values * @param item - the item from which the values will b
src/index.ts:512
↓ 1 callersFunctiongetClosenessRanking
* Returns a score based on how spread apart the * characters from the stringToRank are within the testString. * A number close to rankings.MATCHES r
src/index.ts:328
↓ 1 callersFunctiongetHighestRanking
* Gets the highest ranking for value for the given item based on its values for the given keys * @param {*} item - the item to rank * @param {Array}
src/index.ts:145
↓ 1 callersFunctiongetItemValues
* Gets value for key in item at arbitrarily nested keypath * @param {Object} item - the item * @param {Object|Function} key - the potentially nested
src/index.ts:425
↓ 1 callersFunctiongetKeyAttributes
* Gets all the attributes for the given key * @param key - the key from which the attributes will be retrieved * @return object containing the key's
src/index.ts:540
↓ 1 callersFunctiongetNestedValues
* Given path: "foo.bar.baz" * And item: {foo: {bar: {baz: 'buzz'}}} * -> 'buzz' * @param path a dot-separated set of keys * @param item the item
src/index.ts:463
↓ 1 callersFunctiongetRanking
(spread: number)
src/index.ts:348
↓ 1 callersFunctionindexesOf
(testString: string, stringToRank: string)
src/index.ts:194
↓ 1 callersFunctionmatchSorter
* Takes an array of items and a value and returns a new array with the items that match the given value * @param {Array} items - the items to sort *
src/index.ts:82
↓ 1 callersFunctionsortRankedValues
* Sorts items that have a rank, index, and keyIndex * @param {Object} a - the first item to sort * @param {Object} b - the second item to sort * @r
src/index.ts:378
FunctiondefaultBaseSortFn
(a, b)
src/index.ts:72
FunctionreduceItemsToRanked
( matches: Array<RankedItem<ItemType>>, item: ItemType, index: number, )
src/index.ts:120
FunctiontestFn
()
src/__tests__/index.ts:661