match-sorter
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -209,6 +209,8 @@ 'use strict'; | ||
var rankings = { | ||
CASE_SENSITIVE_EQUAL: 7, | ||
EQUAL: 6, | ||
STARTS_WITH: 5, | ||
WORD_STARTS_WITH: 4, | ||
CASE_SENSITIVE_EQUAL: 9, | ||
EQUAL: 8, | ||
STARTS_WITH: 7, | ||
WORD_STARTS_WITH: 6, | ||
STRING_CASE: 5, | ||
STRING_CASE_ACRONYM: 4, | ||
CONTAINS: 3, | ||
@@ -220,3 +222,12 @@ ACRONYM: 2, | ||
var caseRankings = { | ||
CAMEL: 0.8, | ||
PASCAL: 0.6, | ||
KEBAB: 0.4, | ||
SNAKE: 0.2, | ||
NO_CASE: 0 | ||
}; | ||
matchSorter.rankings = rankings; | ||
matchSorter.caseRankings = caseRankings; | ||
@@ -296,3 +307,3 @@ /** | ||
function getMatchRanking(testString, stringToRank, options) { | ||
/* eslint complexity:[2, 9] */ | ||
/* eslint complexity:[2, 11] */ | ||
testString = prepareValueForComparison(testString, options); | ||
@@ -311,2 +322,6 @@ stringToRank = prepareValueForComparison(stringToRank, options); | ||
var caseRank = getCaseRanking(testString); | ||
var isPartial = isPartialOfCase(testString, stringToRank, caseRank); | ||
var isCasedAcronym = isCaseAcronym(testString, stringToRank, caseRank); | ||
// Lowercasing before further comparison | ||
@@ -318,3 +333,3 @@ testString = testString.toLowerCase(); | ||
if (testString === stringToRank) { | ||
return rankings.EQUAL; | ||
return rankings.EQUAL + caseRank; | ||
} | ||
@@ -324,3 +339,3 @@ | ||
if (testString.indexOf(stringToRank) === 0) { | ||
return rankings.STARTS_WITH; | ||
return rankings.STARTS_WITH + caseRank; | ||
} | ||
@@ -330,8 +345,18 @@ | ||
if (testString.indexOf(' ' + stringToRank) !== -1) { | ||
return rankings.WORD_STARTS_WITH; | ||
return rankings.WORD_STARTS_WITH + caseRank; | ||
} | ||
// is a part inside a cased string | ||
if (isPartial) { | ||
return rankings.STRING_CASE + caseRank; | ||
} | ||
// is acronym for a cased string | ||
if (caseRank > 0 && isCasedAcronym) { | ||
return rankings.STRING_CASE_ACRONYM + caseRank; | ||
} | ||
// contains | ||
if (testString.indexOf(stringToRank) !== -1) { | ||
return rankings.CONTAINS; | ||
return rankings.CONTAINS + caseRank; | ||
} else if (stringToRank.length === 1) { | ||
@@ -346,3 +371,3 @@ // If the only character in the given stringToRank | ||
if (getAcronym(testString).indexOf(stringToRank) !== -1) { | ||
return rankings.ACRONYM; | ||
return rankings.ACRONYM + caseRank; | ||
} | ||
@@ -374,2 +399,96 @@ | ||
/** | ||
* Returns a score base on the case of the testString | ||
* @param {String} testString - the string to test against | ||
* @returns {Number} the number of the ranking, | ||
* based on the case between 0 and 1 for how the testString matches the case | ||
*/ | ||
function getCaseRanking(testString) { | ||
var containsUpperCase = testString.toLowerCase() !== testString; | ||
var containsDash = testString.includes('-'); | ||
var containsUnderscore = testString.includes('_'); | ||
if (!containsUpperCase && !containsUnderscore && containsDash) { | ||
return caseRankings.KEBAB; | ||
} | ||
if (!containsUpperCase && containsUnderscore && !containsDash) { | ||
return caseRankings.SNAKE; | ||
} | ||
if (containsUpperCase && !containsDash && !containsUnderscore) { | ||
var startsWithUpperCase = testString[0].toUpperCase() === testString[0]; | ||
if (startsWithUpperCase) { | ||
return caseRankings.PASCAL; | ||
} | ||
return caseRankings.CAMEL; | ||
} | ||
return caseRankings.NO_CASE; | ||
} | ||
/** | ||
* Returns whether the stringToRank is one of the case parts in the testString (works with any string case) | ||
* @example | ||
* // returns true | ||
* isPartialOfCase('helloWorld', 'world', caseRankings.CAMEL) | ||
* @example | ||
* // returns false | ||
* isPartialOfCase('helloWorld', 'oworl', caseRankings.CAMEL) | ||
* @param {String} testString - the string to test against | ||
* @param {String} stringToRank - the string to rank | ||
* @param {Number} caseRanking - the ranking score based on case of testString | ||
* @returns {Boolean} whether the stringToRank is one of the case parts in the testString | ||
*/ | ||
function isPartialOfCase(testString, stringToRank, caseRanking) { | ||
var testIndex = testString.toLowerCase().indexOf(stringToRank.toLowerCase()); | ||
switch (caseRanking) { | ||
case caseRankings.SNAKE: | ||
return testString[testIndex - 1] === '_'; | ||
case caseRankings.KEBAB: | ||
return testString[testIndex - 1] === '-'; | ||
case caseRankings.PASCAL: | ||
case caseRankings.CAMEL: | ||
return testIndex !== -1 && testString[testIndex] === testString[testIndex].toUpperCase(); | ||
default: | ||
return false; | ||
} | ||
} | ||
/** | ||
* Check if stringToRank is an acronym for a partial case | ||
* @example | ||
* // returns true | ||
* isCaseAcronym('super_duper_file', 'sdf', caseRankings.SNAKE) | ||
* @param {String} testString - the string to test against | ||
* @param {String} stringToRank - the acronym to test | ||
* @param {Number} caseRank - the ranking of the case | ||
* @returns {Boolean} whether the stringToRank is an acronym for the testString | ||
*/ | ||
function isCaseAcronym(testString, stringToRank, caseRank) { | ||
var splitValue = null; | ||
switch (caseRank) { | ||
case caseRankings.SNAKE: | ||
splitValue = '_'; | ||
break; | ||
case caseRankings.KEBAB: | ||
splitValue = '-'; | ||
break; | ||
case caseRankings.PASCAL: | ||
case caseRankings.CAMEL: | ||
splitValue = /(?=[A-Z])/; | ||
break; | ||
default: | ||
splitValue = null; | ||
} | ||
var splitTestString = testString.split(splitValue); | ||
return stringToRank.toLowerCase().split('').reduce(function (correct, char, charIndex) { | ||
var splitItem = splitTestString[charIndex]; | ||
return correct && splitItem && splitItem[0].toLowerCase() === char; | ||
}, true); | ||
} | ||
/** | ||
* Returns a score based on how spread apart the | ||
@@ -376,0 +495,0 @@ * characters from the stringToRank are within the testString. |
@@ -207,6 +207,8 @@ function createCommonjsModule(fn, module) { | ||
var rankings = { | ||
CASE_SENSITIVE_EQUAL: 7, | ||
EQUAL: 6, | ||
STARTS_WITH: 5, | ||
WORD_STARTS_WITH: 4, | ||
CASE_SENSITIVE_EQUAL: 9, | ||
EQUAL: 8, | ||
STARTS_WITH: 7, | ||
WORD_STARTS_WITH: 6, | ||
STRING_CASE: 5, | ||
STRING_CASE_ACRONYM: 4, | ||
CONTAINS: 3, | ||
@@ -218,3 +220,12 @@ ACRONYM: 2, | ||
var caseRankings = { | ||
CAMEL: 0.8, | ||
PASCAL: 0.6, | ||
KEBAB: 0.4, | ||
SNAKE: 0.2, | ||
NO_CASE: 0 | ||
}; | ||
matchSorter.rankings = rankings; | ||
matchSorter.caseRankings = caseRankings; | ||
@@ -294,3 +305,3 @@ /** | ||
function getMatchRanking(testString, stringToRank, options) { | ||
/* eslint complexity:[2, 9] */ | ||
/* eslint complexity:[2, 11] */ | ||
testString = prepareValueForComparison(testString, options); | ||
@@ -309,2 +320,6 @@ stringToRank = prepareValueForComparison(stringToRank, options); | ||
var caseRank = getCaseRanking(testString); | ||
var isPartial = isPartialOfCase(testString, stringToRank, caseRank); | ||
var isCasedAcronym = isCaseAcronym(testString, stringToRank, caseRank); | ||
// Lowercasing before further comparison | ||
@@ -316,3 +331,3 @@ testString = testString.toLowerCase(); | ||
if (testString === stringToRank) { | ||
return rankings.EQUAL; | ||
return rankings.EQUAL + caseRank; | ||
} | ||
@@ -322,3 +337,3 @@ | ||
if (testString.indexOf(stringToRank) === 0) { | ||
return rankings.STARTS_WITH; | ||
return rankings.STARTS_WITH + caseRank; | ||
} | ||
@@ -328,8 +343,18 @@ | ||
if (testString.indexOf(' ' + stringToRank) !== -1) { | ||
return rankings.WORD_STARTS_WITH; | ||
return rankings.WORD_STARTS_WITH + caseRank; | ||
} | ||
// is a part inside a cased string | ||
if (isPartial) { | ||
return rankings.STRING_CASE + caseRank; | ||
} | ||
// is acronym for a cased string | ||
if (caseRank > 0 && isCasedAcronym) { | ||
return rankings.STRING_CASE_ACRONYM + caseRank; | ||
} | ||
// contains | ||
if (testString.indexOf(stringToRank) !== -1) { | ||
return rankings.CONTAINS; | ||
return rankings.CONTAINS + caseRank; | ||
} else if (stringToRank.length === 1) { | ||
@@ -344,3 +369,3 @@ // If the only character in the given stringToRank | ||
if (getAcronym(testString).indexOf(stringToRank) !== -1) { | ||
return rankings.ACRONYM; | ||
return rankings.ACRONYM + caseRank; | ||
} | ||
@@ -372,2 +397,96 @@ | ||
/** | ||
* Returns a score base on the case of the testString | ||
* @param {String} testString - the string to test against | ||
* @returns {Number} the number of the ranking, | ||
* based on the case between 0 and 1 for how the testString matches the case | ||
*/ | ||
function getCaseRanking(testString) { | ||
var containsUpperCase = testString.toLowerCase() !== testString; | ||
var containsDash = testString.includes('-'); | ||
var containsUnderscore = testString.includes('_'); | ||
if (!containsUpperCase && !containsUnderscore && containsDash) { | ||
return caseRankings.KEBAB; | ||
} | ||
if (!containsUpperCase && containsUnderscore && !containsDash) { | ||
return caseRankings.SNAKE; | ||
} | ||
if (containsUpperCase && !containsDash && !containsUnderscore) { | ||
var startsWithUpperCase = testString[0].toUpperCase() === testString[0]; | ||
if (startsWithUpperCase) { | ||
return caseRankings.PASCAL; | ||
} | ||
return caseRankings.CAMEL; | ||
} | ||
return caseRankings.NO_CASE; | ||
} | ||
/** | ||
* Returns whether the stringToRank is one of the case parts in the testString (works with any string case) | ||
* @example | ||
* // returns true | ||
* isPartialOfCase('helloWorld', 'world', caseRankings.CAMEL) | ||
* @example | ||
* // returns false | ||
* isPartialOfCase('helloWorld', 'oworl', caseRankings.CAMEL) | ||
* @param {String} testString - the string to test against | ||
* @param {String} stringToRank - the string to rank | ||
* @param {Number} caseRanking - the ranking score based on case of testString | ||
* @returns {Boolean} whether the stringToRank is one of the case parts in the testString | ||
*/ | ||
function isPartialOfCase(testString, stringToRank, caseRanking) { | ||
var testIndex = testString.toLowerCase().indexOf(stringToRank.toLowerCase()); | ||
switch (caseRanking) { | ||
case caseRankings.SNAKE: | ||
return testString[testIndex - 1] === '_'; | ||
case caseRankings.KEBAB: | ||
return testString[testIndex - 1] === '-'; | ||
case caseRankings.PASCAL: | ||
case caseRankings.CAMEL: | ||
return testIndex !== -1 && testString[testIndex] === testString[testIndex].toUpperCase(); | ||
default: | ||
return false; | ||
} | ||
} | ||
/** | ||
* Check if stringToRank is an acronym for a partial case | ||
* @example | ||
* // returns true | ||
* isCaseAcronym('super_duper_file', 'sdf', caseRankings.SNAKE) | ||
* @param {String} testString - the string to test against | ||
* @param {String} stringToRank - the acronym to test | ||
* @param {Number} caseRank - the ranking of the case | ||
* @returns {Boolean} whether the stringToRank is an acronym for the testString | ||
*/ | ||
function isCaseAcronym(testString, stringToRank, caseRank) { | ||
var splitValue = null; | ||
switch (caseRank) { | ||
case caseRankings.SNAKE: | ||
splitValue = '_'; | ||
break; | ||
case caseRankings.KEBAB: | ||
splitValue = '-'; | ||
break; | ||
case caseRankings.PASCAL: | ||
case caseRankings.CAMEL: | ||
splitValue = /(?=[A-Z])/; | ||
break; | ||
default: | ||
splitValue = null; | ||
} | ||
var splitTestString = testString.split(splitValue); | ||
return stringToRank.toLowerCase().split('').reduce(function (correct, char, charIndex) { | ||
var splitItem = splitTestString[charIndex]; | ||
return correct && splitItem && splitItem[0].toLowerCase() === char; | ||
}, true); | ||
} | ||
/** | ||
* Returns a score based on how spread apart the | ||
@@ -374,0 +493,0 @@ * characters from the stringToRank are within the testString. |
@@ -213,6 +213,8 @@ (function (global, factory) { | ||
var rankings = { | ||
CASE_SENSITIVE_EQUAL: 7, | ||
EQUAL: 6, | ||
STARTS_WITH: 5, | ||
WORD_STARTS_WITH: 4, | ||
CASE_SENSITIVE_EQUAL: 9, | ||
EQUAL: 8, | ||
STARTS_WITH: 7, | ||
WORD_STARTS_WITH: 6, | ||
STRING_CASE: 5, | ||
STRING_CASE_ACRONYM: 4, | ||
CONTAINS: 3, | ||
@@ -224,3 +226,12 @@ ACRONYM: 2, | ||
var caseRankings = { | ||
CAMEL: 0.8, | ||
PASCAL: 0.6, | ||
KEBAB: 0.4, | ||
SNAKE: 0.2, | ||
NO_CASE: 0 | ||
}; | ||
matchSorter.rankings = rankings; | ||
matchSorter.caseRankings = caseRankings; | ||
@@ -300,3 +311,3 @@ /** | ||
function getMatchRanking(testString, stringToRank, options) { | ||
/* eslint complexity:[2, 9] */ | ||
/* eslint complexity:[2, 11] */ | ||
testString = prepareValueForComparison(testString, options); | ||
@@ -315,2 +326,6 @@ stringToRank = prepareValueForComparison(stringToRank, options); | ||
var caseRank = getCaseRanking(testString); | ||
var isPartial = isPartialOfCase(testString, stringToRank, caseRank); | ||
var isCasedAcronym = isCaseAcronym(testString, stringToRank, caseRank); | ||
// Lowercasing before further comparison | ||
@@ -322,3 +337,3 @@ testString = testString.toLowerCase(); | ||
if (testString === stringToRank) { | ||
return rankings.EQUAL; | ||
return rankings.EQUAL + caseRank; | ||
} | ||
@@ -328,3 +343,3 @@ | ||
if (testString.indexOf(stringToRank) === 0) { | ||
return rankings.STARTS_WITH; | ||
return rankings.STARTS_WITH + caseRank; | ||
} | ||
@@ -334,8 +349,18 @@ | ||
if (testString.indexOf(' ' + stringToRank) !== -1) { | ||
return rankings.WORD_STARTS_WITH; | ||
return rankings.WORD_STARTS_WITH + caseRank; | ||
} | ||
// is a part inside a cased string | ||
if (isPartial) { | ||
return rankings.STRING_CASE + caseRank; | ||
} | ||
// is acronym for a cased string | ||
if (caseRank > 0 && isCasedAcronym) { | ||
return rankings.STRING_CASE_ACRONYM + caseRank; | ||
} | ||
// contains | ||
if (testString.indexOf(stringToRank) !== -1) { | ||
return rankings.CONTAINS; | ||
return rankings.CONTAINS + caseRank; | ||
} else if (stringToRank.length === 1) { | ||
@@ -350,3 +375,3 @@ // If the only character in the given stringToRank | ||
if (getAcronym(testString).indexOf(stringToRank) !== -1) { | ||
return rankings.ACRONYM; | ||
return rankings.ACRONYM + caseRank; | ||
} | ||
@@ -378,2 +403,96 @@ | ||
/** | ||
* Returns a score base on the case of the testString | ||
* @param {String} testString - the string to test against | ||
* @returns {Number} the number of the ranking, | ||
* based on the case between 0 and 1 for how the testString matches the case | ||
*/ | ||
function getCaseRanking(testString) { | ||
var containsUpperCase = testString.toLowerCase() !== testString; | ||
var containsDash = testString.includes('-'); | ||
var containsUnderscore = testString.includes('_'); | ||
if (!containsUpperCase && !containsUnderscore && containsDash) { | ||
return caseRankings.KEBAB; | ||
} | ||
if (!containsUpperCase && containsUnderscore && !containsDash) { | ||
return caseRankings.SNAKE; | ||
} | ||
if (containsUpperCase && !containsDash && !containsUnderscore) { | ||
var startsWithUpperCase = testString[0].toUpperCase() === testString[0]; | ||
if (startsWithUpperCase) { | ||
return caseRankings.PASCAL; | ||
} | ||
return caseRankings.CAMEL; | ||
} | ||
return caseRankings.NO_CASE; | ||
} | ||
/** | ||
* Returns whether the stringToRank is one of the case parts in the testString (works with any string case) | ||
* @example | ||
* // returns true | ||
* isPartialOfCase('helloWorld', 'world', caseRankings.CAMEL) | ||
* @example | ||
* // returns false | ||
* isPartialOfCase('helloWorld', 'oworl', caseRankings.CAMEL) | ||
* @param {String} testString - the string to test against | ||
* @param {String} stringToRank - the string to rank | ||
* @param {Number} caseRanking - the ranking score based on case of testString | ||
* @returns {Boolean} whether the stringToRank is one of the case parts in the testString | ||
*/ | ||
function isPartialOfCase(testString, stringToRank, caseRanking) { | ||
var testIndex = testString.toLowerCase().indexOf(stringToRank.toLowerCase()); | ||
switch (caseRanking) { | ||
case caseRankings.SNAKE: | ||
return testString[testIndex - 1] === '_'; | ||
case caseRankings.KEBAB: | ||
return testString[testIndex - 1] === '-'; | ||
case caseRankings.PASCAL: | ||
case caseRankings.CAMEL: | ||
return testIndex !== -1 && testString[testIndex] === testString[testIndex].toUpperCase(); | ||
default: | ||
return false; | ||
} | ||
} | ||
/** | ||
* Check if stringToRank is an acronym for a partial case | ||
* @example | ||
* // returns true | ||
* isCaseAcronym('super_duper_file', 'sdf', caseRankings.SNAKE) | ||
* @param {String} testString - the string to test against | ||
* @param {String} stringToRank - the acronym to test | ||
* @param {Number} caseRank - the ranking of the case | ||
* @returns {Boolean} whether the stringToRank is an acronym for the testString | ||
*/ | ||
function isCaseAcronym(testString, stringToRank, caseRank) { | ||
var splitValue = null; | ||
switch (caseRank) { | ||
case caseRankings.SNAKE: | ||
splitValue = '_'; | ||
break; | ||
case caseRankings.KEBAB: | ||
splitValue = '-'; | ||
break; | ||
case caseRankings.PASCAL: | ||
case caseRankings.CAMEL: | ||
splitValue = /(?=[A-Z])/; | ||
break; | ||
default: | ||
splitValue = null; | ||
} | ||
var splitTestString = testString.split(splitValue); | ||
return stringToRank.toLowerCase().split('').reduce(function (correct, char, charIndex) { | ||
var splitItem = splitTestString[charIndex]; | ||
return correct && splitItem && splitItem[0].toLowerCase() === char; | ||
}, true); | ||
} | ||
/** | ||
* Returns a score based on how spread apart the | ||
@@ -380,0 +499,0 @@ * characters from the stringToRank are within the testString. |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.matchSorter=t()}(this,function(){"use strict";function e(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.keys,i=n.threshold,u=void 0===i?b.MATCHES:i;return e.reduce(function(e,s,i){var f=function(e,s,r,n){if(!s)return{rank:t(e,r,n),keyIndex:-1};return function(e,t){return t.reduce(function(t,s){var r=function(e,t){"object"===(void 0===t?"undefined":a(t))&&(t=t.key);var s=void 0;s="function"==typeof t?t(e):-1!==t.indexOf(".")?t.split(".").reduce(function(e,t){return e?e[t]:null},e):e[t];return s?[].concat(s):null}(e,s);return r&&r.forEach(function(e){t.push({itemValue:e,attributes:function(e){"string"==typeof e&&(e={key:e});return l({maxRanking:1/0,minRanking:-1/0},e)}(s)})}),t},[])}(e,s).reduce(function(e,s,a){var l=e.rank,o=e.keyIndex,i=s.itemValue,u=s.attributes,f=t(i,r,n),c=u.minRanking,d=u.maxRanking;return f<c&&f>=b.MATCHES?f=c:f>d&&(f=d),f>l&&(l=f,o=a),{rank:l,keyIndex:o}},{rank:b.NO_MATCH,keyIndex:-1})}(s,o,r,n),c=f.rank,d=f.keyIndex;return c>=u&&e.push({item:s,rank:c,index:i,keyIndex:d}),e},[]).sort(s).map(function(e){return e.item})}function t(e,t,s){return e=r(e,s),(t=r(t,s)).length>e.length?b.NO_MATCH:e===t?b.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase(),t=t.toLowerCase(),e===t?b.EQUAL:0===e.indexOf(t)?b.STARTS_WITH:-1!==e.indexOf(" "+t)?b.WORD_STARTS_WITH:-1!==e.indexOf(t)?b.CONTAINS:1===t.length?b.NO_MATCH:-1!==function(e){var t="";return e.split(" ").forEach(function(e){e.split("-").forEach(function(e){t+=e.substr(0,1)})}),t}(e).indexOf(t)?b.ACRONYM:function(e,t){function s(e,t,s){for(var r=s;r<t.length;r++){if(t[r]===e)return r+1}return-1}var r=0;var n=s(t[0],e,0);if(n<0)return b.NO_MATCH;r=n;for(var a=1;a<t.length;a++){var l=t[a];if(!((r=s(l,e,r))>-1))return b.NO_MATCH}return function(e){var s=r-n-t.length+1;return b.MATCHES+1/s}()}(e,t))}function s(e,t){var s=e.rank,r=e.index,n=e.keyIndex,a=t.rank,l=t.index,b=t.keyIndex;return s===a?n===b?r<l?-1:1:n<b?-1:1:s>a?-1:1}function r(e,t){return e=""+e,t.keepDiacritics||(e=n.clean(e)),e}var n=function(e,t){return t={exports:{}},e(t,t.exports),t.exports}(function(e){!function(t,s){e.exports?e.exports=s():this.Diacritics=s()}(0,function(){for(var e={map:{}},t=[{base:" ",letters:" "},{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"Th",letters:"Þ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐɑ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"ff",letters:"ff"},{base:"fi",letters:"fi"},{base:"fl",letters:"fl"},{base:"ffi",letters:"ffi"},{base:"ffl",letters:"ffl"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nñnⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥлԉ"},{base:"nj",letters:"nj"},{base:"o",letters:"߀oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oe",letters:"Œœ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"ss",letters:"ß"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"th",letters:"þ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],s=0,r=t.length;s<r;s++)for(var n=t[s].letters.split(""),a=0,l=n.length;a<l;a++)e.map[n[a]]=t[s].base;return e.clean=function(t){if(!t||!t.length||t.length<1)return"";for(var s,r="",n=t.split(""),a=0,l=n.length;a<l;a++)r+=(s=n[a])in e.map?e.map[s]:s;return r},e})}),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},b={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};e.rankings=b;var o=Object.freeze({default:e,rankings:b}),i=e;return Object.assign(i,Object.keys(o).reduce(function(e,t){return"default"!==t&&(e[t]=o[t]),e},{})),i}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.matchSorter=t()}(this,function(){"use strict";function e(e,s){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.keys,u=n.threshold,i=void 0===u?b.MATCHES:u;return e.reduce(function(e,r,u){var f=function(e,r,s,n){if(!r)return{rank:t(e,s,n),keyIndex:-1};return function(e,t){return t.reduce(function(t,r){var s=function(e,t){"object"===(void 0===t?"undefined":a(t))&&(t=t.key);var r=void 0;r="function"==typeof t?t(e):-1!==t.indexOf(".")?t.split(".").reduce(function(e,t){return e?e[t]:null},e):e[t];return r?[].concat(r):null}(e,r);return s&&s.forEach(function(e){t.push({itemValue:e,attributes:function(e){"string"==typeof e&&(e={key:e});return l({maxRanking:1/0,minRanking:-1/0},e)}(r)})}),t},[])}(e,r).reduce(function(e,r,a){var l=e.rank,o=e.keyIndex,u=r.itemValue,i=r.attributes,f=t(u,s,n),c=i.minRanking,A=i.maxRanking;return f<c&&f>=b.MATCHES?f=c:f>A&&(f=A),f>l&&(l=f,o=a),{rank:l,keyIndex:o}},{rank:b.NO_MATCH,keyIndex:-1})}(r,o,s,n),c=f.rank,A=f.keyIndex;return c>=i&&e.push({item:r,rank:c,index:u,keyIndex:A}),e},[]).sort(r).map(function(e){return e.item})}function t(e,t,r){if(e=s(e,r),(t=s(t,r)).length>e.length)return b.NO_MATCH;if(e===t)return b.CASE_SENSITIVE_EQUAL;var n=function(e){var t=e.toLowerCase()!==e,r=e.includes("-"),s=e.includes("_");if(!t&&!s&&r)return o.KEBAB;if(!t&&s&&!r)return o.SNAKE;if(t&&!r&&!s){return e[0].toUpperCase()===e[0]?o.PASCAL:o.CAMEL}return o.NO_CASE}(e),a=function(e,t,r){var s=e.toLowerCase().indexOf(t.toLowerCase());switch(r){case o.SNAKE:return"_"===e[s-1];case o.KEBAB:return"-"===e[s-1];case o.PASCAL:case o.CAMEL:return-1!==s&&e[s]===e[s].toUpperCase();default:return!1}}(e,t,n),l=function(e,t,r){var s=null;switch(r){case o.SNAKE:s="_";break;case o.KEBAB:s="-";break;case o.PASCAL:case o.CAMEL:s=/(?=[A-Z])/;break;default:s=null}var n=e.split(s);return t.toLowerCase().split("").reduce(function(e,t,r){var s=n[r];return e&&s&&s[0].toLowerCase()===t},!0)}(e,t,n);return e=e.toLowerCase(),t=t.toLowerCase(),e===t?b.EQUAL+n:0===e.indexOf(t)?b.STARTS_WITH+n:-1!==e.indexOf(" "+t)?b.WORD_STARTS_WITH+n:a?b.STRING_CASE+n:n>0&&l?b.STRING_CASE_ACRONYM+n:-1!==e.indexOf(t)?b.CONTAINS+n:1===t.length?b.NO_MATCH:-1!==function(e){var t="";return e.split(" ").forEach(function(e){e.split("-").forEach(function(e){t+=e.substr(0,1)})}),t}(e).indexOf(t)?b.ACRONYM+n:function(e,t){function r(e,t,r){for(var s=r;s<t.length;s++){if(t[s]===e)return s+1}return-1}var s=0;var n=r(t[0],e,0);if(n<0)return b.NO_MATCH;s=n;for(var a=1;a<t.length;a++){var l=t[a];if(!((s=r(l,e,s))>-1))return b.NO_MATCH}return function(e){var r=s-n-t.length+1;return b.MATCHES+1/r}()}(e,t)}function r(e,t){var r=e.rank,s=e.index,n=e.keyIndex,a=t.rank,l=t.index,b=t.keyIndex;return r===a?n===b?s<l?-1:1:n<b?-1:1:r>a?-1:1}function s(e,t){return e=""+e,t.keepDiacritics||(e=n.clean(e)),e}var n=function(e,t){return t={exports:{}},e(t,t.exports),t.exports}(function(e){!function(t,r){e.exports?e.exports=r():this.Diacritics=r()}(0,function(){for(var e={map:{}},t=[{base:" ",letters:" "},{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"Th",letters:"Þ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐɑ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"ff",letters:"ff"},{base:"fi",letters:"fi"},{base:"fl",letters:"fl"},{base:"ffi",letters:"ffi"},{base:"ffl",letters:"ffl"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nñnⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥлԉ"},{base:"nj",letters:"nj"},{base:"o",letters:"߀oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oe",letters:"Œœ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"ss",letters:"ß"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"th",letters:"þ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],r=0,s=t.length;r<s;r++)for(var n=t[r].letters.split(""),a=0,l=n.length;a<l;a++)e.map[n[a]]=t[r].base;return e.clean=function(t){if(!t||!t.length||t.length<1)return"";for(var r,s="",n=t.split(""),a=0,l=n.length;a<l;a++)s+=(r=n[a])in e.map?e.map[r]:r;return s},e})}),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},b={CASE_SENSITIVE_EQUAL:9,EQUAL:8,STARTS_WITH:7,WORD_STARTS_WITH:6,STRING_CASE:5,STRING_CASE_ACRONYM:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0},o={CAMEL:.8,PASCAL:.6,KEBAB:.4,SNAKE:.2,NO_CASE:0};e.rankings=b,e.caseRankings=o;var u=Object.freeze({default:e,rankings:b}),i=e;return Object.assign(i,Object.keys(u).reduce(function(e,t){return"default"!==t&&(e[t]=u[t]),e},{})),i}); | ||
//# sourceMappingURL=match-sorter.umd.min.js.map |
{ | ||
"name": "match-sorter", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "Simple, expected, and deterministic best-match sorting of an array in JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "dist/match-sorter.cjs.js", |
@@ -18,3 +18,3 @@ <div align="center"> | ||
[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors) | ||
[![All Contributors](https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square)](#contributors) | ||
[![PRs Welcome][prs-badge]][prs] | ||
@@ -51,5 +51,7 @@ [![Donate][donate-badge]][donate] | ||
4. **WORD STARTS WITH**: If the item has multiple words, then if one of those words starts with the given value (ex. `Repub` would match `Dominican Republic`) | ||
5. **CONTAINS**: If the item contains the given value (ex. `ham` would match `Bahamas`) | ||
6. **ACRONYM**: If the item's acronym is the given value (ex. `us` would match `United States`) | ||
7. **SIMPLE MATCH**: If the item has letters in the same order as the letters of the given value (ex. `iw` would match `Zimbabwe`, but not `Kuwait` because it must be in the same order). Furthermore, if the item is a closer match, it will rank higher (ex. `ua` matches `Uruguay` more closely than `United States of America`, therefore `Uruguay` will be ordered before `United States of America`) | ||
5. **CASE STARTS WITH**: If the item has a defined case (`camelCase`, `PascalCase`, `snake_case` or `kebab-case`), then if one of the parts starts with the given value (ex. `kingdom` would match `unitedKingdom` or `united_kingdom`) | ||
6. **CASE ACRONYM** If the item's case matches the synonym (ex. `uk` would match `united-kingdom` or `UnitedKingdom`) | ||
7. **CONTAINS**: If the item contains the given value (ex. `ham` would match `Bahamas`) | ||
8. **ACRONYM**: If the item's acronym is the given value (ex. `us` would match `United States`) | ||
9. **SIMPLE MATCH**: If the item has letters in the same order as the letters of the given value (ex. `iw` would match `Zimbabwe`, but not `Kuwait` because it must be in the same order). Furthermore, if the item is a closer match, it will rank higher (ex. `ua` matches `Uruguay` more closely than `United States of America`, therefore `Uruguay` will be ordered before `United States of America`) | ||
@@ -177,2 +179,4 @@ This ranking seems to make sense in people's minds. At least it does in mine. Feedback welcome! | ||
* WORD_STARTS_WITH | ||
* STRING_CASE | ||
* STRING_CASE ACRONYM | ||
* CONTAINS | ||
@@ -222,3 +226,3 @@ * ACRONYM | ||
`import matchSorter, {rankings} from 'match-sorter'` | ||
`import matchSorter, {rankings, caseRankings} from 'match-sorter'` | ||
@@ -238,4 +242,4 @@ ## Inspiration | ||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> | ||
| [<img src="https://avatars.githubusercontent.com/u/1500684?v=3" width="100px;"/><br /><sub>Kent C. Dodds</sub>](https://kentcdodds.com)<br />[💻](https://github.com/kentcdodds/match-sorter/commits?author=kentcdodds) [📖](https://github.com/kentcdodds/match-sorter/commits?author=kentcdodds) 🚇 [⚠️](https://github.com/kentcdodds/match-sorter/commits?author=kentcdodds) 👀 | [<img src="https://avatars.githubusercontent.com/u/8263298?v=3" width="100px;"/><br /><sub>Conor Hastings</sub>](http://conorhastings.com)<br />[💻](https://github.com/kentcdodds/match-sorter/commits?author=conorhastings) [📖](https://github.com/kentcdodds/match-sorter/commits?author=conorhastings) [⚠️](https://github.com/kentcdodds/match-sorter/commits?author=conorhastings) 👀 | [<img src="https://avatars.githubusercontent.com/u/574806?v=3" width="100px;"/><br /><sub>Rogelio Guzman</sub>](https://github.com/rogeliog)<br />[📖](https://github.com/kentcdodds/match-sorter/commits?author=rogeliog) | [<img src="https://avatars.githubusercontent.com/u/1416436?v=3" width="100px;"/><br /><sub>Claudéric Demers</sub>](http://ced.io)<br />[💻](https://github.com/kentcdodds/match-sorter/commits?author=clauderic) [📖](https://github.com/kentcdodds/match-sorter/commits?author=clauderic) [⚠️](https://github.com/kentcdodds/match-sorter/commits?author=clauderic) | [<img src="https://avatars3.githubusercontent.com/u/4150097?v=3" width="100px;"/><br /><sub>Kevin Davis</sub>](kevindav.us)<br />[💻](https://github.com/kentcdodds/match-sorter/commits?author=osfan501) [⚠️](https://github.com/kentcdodds/match-sorter/commits?author=osfan501) | [<img src="https://avatars1.githubusercontent.com/u/19157735?v=3" width="100px;"/><br /><sub>Denver Chen</sub>](https://github.com/nfdjps)<br />[💻](https://github.com/kentcdodds/match-sorter/commits?author=nfdjps) [📖](https://github.com/kentcdodds/match-sorter/commits?author=nfdjps) [⚠️](https://github.com/kentcdodds/match-sorter/commits?author=nfdjps) | | ||
| :---: | :---: | :---: | :---: | :---: | :---: | | ||
| [<img src="https://avatars.githubusercontent.com/u/1500684?v=3" width="100px;"/><br /><sub><b>Kent C. Dodds</b></sub>](https://kentcdodds.com)<br />[💻](https://github.com/kentcdodds/match-sorter/commits?author=kentcdodds "Code") [📖](https://github.com/kentcdodds/match-sorter/commits?author=kentcdodds "Documentation") [🚇](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [⚠️](https://github.com/kentcdodds/match-sorter/commits?author=kentcdodds "Tests") [👀](#review-kentcdodds "Reviewed Pull Requests") | [<img src="https://avatars.githubusercontent.com/u/8263298?v=3" width="100px;"/><br /><sub><b>Conor Hastings</b></sub>](http://conorhastings.com)<br />[💻](https://github.com/kentcdodds/match-sorter/commits?author=conorhastings "Code") [📖](https://github.com/kentcdodds/match-sorter/commits?author=conorhastings "Documentation") [⚠️](https://github.com/kentcdodds/match-sorter/commits?author=conorhastings "Tests") [👀](#review-conorhastings "Reviewed Pull Requests") | [<img src="https://avatars.githubusercontent.com/u/574806?v=3" width="100px;"/><br /><sub><b>Rogelio Guzman</b></sub>](https://github.com/rogeliog)<br />[📖](https://github.com/kentcdodds/match-sorter/commits?author=rogeliog "Documentation") | [<img src="https://avatars.githubusercontent.com/u/1416436?v=3" width="100px;"/><br /><sub><b>Claudéric Demers</b></sub>](http://ced.io)<br />[💻](https://github.com/kentcdodds/match-sorter/commits?author=clauderic "Code") [📖](https://github.com/kentcdodds/match-sorter/commits?author=clauderic "Documentation") [⚠️](https://github.com/kentcdodds/match-sorter/commits?author=clauderic "Tests") | [<img src="https://avatars3.githubusercontent.com/u/4150097?v=3" width="100px;"/><br /><sub><b>Kevin Davis</b></sub>](kevindav.us)<br />[💻](https://github.com/kentcdodds/match-sorter/commits?author=osfan501 "Code") [⚠️](https://github.com/kentcdodds/match-sorter/commits?author=osfan501 "Tests") | [<img src="https://avatars1.githubusercontent.com/u/19157735?v=3" width="100px;"/><br /><sub><b>Denver Chen</b></sub>](https://github.com/nfdjps)<br />[💻](https://github.com/kentcdodds/match-sorter/commits?author=nfdjps "Code") [📖](https://github.com/kentcdodds/match-sorter/commits?author=nfdjps "Documentation") [⚠️](https://github.com/kentcdodds/match-sorter/commits?author=nfdjps "Tests") | [<img src="https://avatars0.githubusercontent.com/u/12719057?v=4" width="100px;"/><br /><sub><b>Christian Ruigrok</b></sub>](http://ruigrok.info)<br />[🐛](https://github.com/kentcdodds/match-sorter/issues?q=author%3AChrisRu "Bug reports") [💻](https://github.com/kentcdodds/match-sorter/commits?author=ChrisRu "Code") [📖](https://github.com/kentcdodds/match-sorter/commits?author=ChrisRu "Documentation") | | ||
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | | ||
<!-- ALL-CONTRIBUTORS-LIST:END --> | ||
@@ -242,0 +246,0 @@ |
Sorry, the diff of this file is not supported yet
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
187104
1910
286