Customized text filter solution
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cli/build
entry
src/fuzzy_filter
.gitattributes
.gitignore
README.md
calcit.edn
meyvn.edn
package.json
shadow-cljs.edn
yarn.lock

README.md

Fuzzy Filter

filter function for better intuitions.

Demo http://repo.mvc-works.org/fuzzy-filter/

Usage

Clojars Project

[mvc-works/fuzzy-filter "0.0.6"]
[fuzzy-filter.core :refer [parse-by-letter parse-by-word]]
[fuzzy-filter.comp.visual :refer [comp-visual]]
(parse-by-letter "this and that to search" "that search")
; => {:matches? false, :chunks [[:hit "th"] [:rest "is "] [:hit "a"] [:rest "nd "] [:hit "t"] [:space "h"] [:rest "at to "] [:hit "searc"] [:rest "h"] [:missed "g"]], :text "this and that to search"}

(parse-by-word "this and that to search" "that searcH")
; => {:matches? false, :chunks [[:rest "this and "] [:hit "that"] [:missed "searcH"]], :text "this and that to search"}

(comp-visual (:sequences result) {:style-rest {:color (hsl 0 0 70)}}))))
:style-base
:style-hit
:style-rest

Workflow

Workflow https://github.com/mvc-works/calcit-workflow

License

MIT