kentcdodds / match-sorter

Simple, expected, and deterministic best-match sorting of an array in JavaScript
https://npm.im/match-sorter
MIT License
3.73k stars 129 forks source link

feat: restrict threshold/ranking type to known values #122

Closed levenleven closed 3 years ago

levenleven commented 3 years ago

What: Restrict threshold/ranking type to known values (rankings)

Why: To encourage users to use predefined rankings

How: Ranking type was extracted from rankings enum

Checklist:

codecov[bot] commented 3 years ago

Codecov Report

Merging #122 (30995f7) into main (ebc9f99) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #122   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          163       163           
  Branches        38        38           
=========================================
  Hits           163       163           
Impacted Files Coverage Δ
src/index.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ebc9f99...30995f7. Read the comment docs.

kentcdodds commented 3 years ago

@all-contributors please add @levenleven for code

allcontributors[bot] commented 3 years ago

@kentcdodds

I've put up a pull request to add @levenleven! :tada:

github-actions[bot] commented 3 years ago

:tada: This PR is included in version 6.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: