hanzi icon indicating copy to clipboard operation
hanzi copied to clipboard

Add exact lookup type for dictionarySearch

Open benlieb opened this issue 6 years ago • 1 comments

For my purposes, I needed a more exact lookup functionality.

For example:

console.log(hanzi.dictionarySearch('小孩', 'only')) gave

image

console.log(hanzi.dictionarySearch('小孩')) gave

image

But now this console.log(hanzi.dictionarySearch('小孩', 'exact')) gives

image

benlieb avatar Mar 01 '20 09:03 benlieb

Codecov Report

Merging #60 into master will increase coverage by 0.04%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #60      +/-   ##
==========================================
+ Coverage   87.77%   87.81%   +0.04%     
==========================================
  Files          15       15              
  Lines         548      550       +2     
  Branches       91       92       +1     
==========================================
+ Hits          481      483       +2     
  Misses         55       55              
  Partials       12       12
Impacted Files Coverage Δ
lib/dictionary.js 88.06% <100%> (+0.07%) :arrow_up:

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 8b80e6d...234d8b1. Read the comment docs.

codecov-io avatar Mar 01 '20 09:03 codecov-io