From 3f990f7446a459fa45e50cc5079e4af550b9217b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=BD=E2=97=95=E2=97=A1=E2=97=95=E2=9C=BF=E3=83=8E?= Date: Sun, 22 May 2022 20:46:12 -0700 Subject: [PATCH] working towards 2.0 --- README.md | 7 +++---- test.html | 2 +- test.js | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 53b74ee..bdf38e1 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Sublime's fuzzy search is... sublime. I wish everything used it. So here's an op - **Fast** - **1ms** to search **13,000** files. - **Tiny** - 1 file, **3kb**. 0 dependencies. -- **Good** - clean api + sorts results well (unlike others who shall not be named). +- **Good** - clean api + sorts results well. https://rawgit.com/farzher/fuzzysort/master/test.html @@ -38,7 +38,7 @@ import fuzzysort from 'fuzzysort' ## Installation Browser ```html - + ``` @@ -155,8 +155,7 @@ bestResult.obj.title // 'Google Chrome' - Added new behavior when your search contains spaces! - Added fuzzysort.min.js - Now depends on ES6 features -- Changed how indexes work to improve GC performance -- Removed result.indexes & Added fuzzysort.indexes +- Removed `result.indexes` & Added `fuzzysort.indexes` (improved GC performance) - Completely Removed `options.allowTypo` - Completely Removed `fuzzysort.goAsync` - Completely Removed `fuzzysort.new` diff --git a/test.html b/test.html index 13ed6f7..6ada4fb 100644 --- a/test.html +++ b/test.html @@ -17,7 +17,7 @@
-
+
diff --git a/test.js b/test.js index 74acd9e..f90a2b9 100644 --- a/test.js +++ b/test.js @@ -13,10 +13,10 @@ HOW TO WRITE TESTS: assert(true, 'my err msg') // must be truthy */ - // require / setup const isNode = typeof require !== 'undefined' && typeof window === 'undefined' -if(isNode) var fuzzysort = require('./fuzzysort') // if we're running in the browser we already have these +const minjs = isNode ? !!process.argv[2] : false // test minified fuzzysort (if node and you pass any cmd argument) +if(isNode) var fuzzysort = minjs ? require('./fuzzysort.min.js') : require('./fuzzysort') // if we're running in the browser we already have these if(isNode) var testdata = require('./testdata') // if we're running in the browser we already have these // config