Wade
:ocean: Blazing fast 1kb search library
Install / Use
/learn @kbrsh/WadeREADME
Wade
Blazing fast 1kb search
Installation
NPM
npm install wade
CDN
<script src="https://unpkg.com/wade"></script>
Usage
Initialize Wade with an array of data.
const search = Wade(["Apple", "Lemon", "Orange", "Tomato"]);
Now you can search for a query within the data, and Wade will return results. Each result will include the index of the item in the data it corresponds to along with a score depending on the relevance of the query to the result.
search("App");
/*
[{
index: 0,
score: 1.25
}]
*/
Combined with JavaScript libraries like Moon, you can create a <a href="https://kbrsh.github.io/moon/play/#const%20items%20%3D%20%5B%22Don't%20worry%20about%20what%20anybody%20else%20is%20going%20to%20do.%20The%20best%20way%20to%20predict%20the%20future%20is%20to%20invent%20it.%22%2C%22Premature%20optimization%20is%20the%20root%20of%20all%20evil%20(or%20at%20least%20most%20of%20it)%20in%20programming.%22%2C%22Lisp%20has%20jokingly%20been%20called%20%5C%22the%20most%20intelligent%20way%20to%20misuse%20a%20computer%5C%22.%20I%20think%20that%20description%20is%20a%20great%20compliment%20because%20it%20transmits%20the%20full%20flavor%20of%20liberation%3A%20it%20has%20assisted%20a%20number%20of%20our%20most%20gifted%20fellow%20humans%20in%20thinking%20previously%20impossible%20thoughts.%22%2C%22Keep%20away%20from%20people%20who%20try%20to%20belittle%20your%20ambitions.%20Small%20people%20always%20do%20that%2C%20but%20the%20really%20great%20make%20you%20feel%20that%20you%2C%20too%2C%20can%20become%20great.%22%2C%22What%20Paul%20does%2C%20and%20does%20very%20well%2C%20is%20to%20take%20ideas%20and%20concepts%20that%20are%20beautiful%20in%20the%20abstract%2C%20and%20brings%20them%20down%20to%20a%20real%20world%20level.%20That's%20a%20rare%20talent%20to%20find%20in%20writing%20these%20days.%22%2C%22Since%20programmers%20create%20programs%20out%20of%20nothing%2C%20imagination%20is%20our%20only%20limitation.%20Thus%2C%20in%20the%20world%20of%20programming%2C%20the%20hero%20is%20the%20one%20who%20has%20great%20vision.%20Paul%20Graham%20is%20one%20of%20our%20contemporary%20heroes.%20He%20has%20the%20ability%20to%20embrace%20the%20vision%2C%20and%20to%20express%20it%20plainly.%20His%20works%20are%20my%20favorites%2C%20especially%20the%20ones%20describing%20language%20design.%20He%20explains%20secrets%20of%20programming%2C%20languages%2C%20and%20human%20nature%20that%20can%20only%20be%20learned%20from%20the%20hacker%20experience.%20This%20book%20shows%20you%20his%20great%20vision%2C%20and%20tells%20you%20the%20truth%20about%20the%20nature%20of%20hacking.%22%2C%22To%20follow%20the%20path%3A%20look%20to%20the%20master%2C%20follow%20the%20master%2C%20walk%20with%20the%20master%2C%20see%20through%20the%20master%2C%20become%20the%20master.%22%2C%22No%20problem%20should%20ever%20have%20to%20be%20solved%20twice.%22%2C%22Attitude%20is%20no%20substitute%20for%20competence.%22%2C%22It%20is%20said%20that%20the%20real%20winner%20is%20the%20one%20who%20lives%20in%20today%20but%20able%20to%20see%20tomorrow.%22%2C%22Fools%20ignore%20complexity.%20Pragmatists%20suffer%20it.%20Some%20can%20avoid%20it.%20Geniuses%20remove%20it.%22%2C%22A%20year%20spent%20in%20artificial%20intelligence%20is%20enough%20to%20make%20one%20believe%20in%20God.%22%2C%22Dealing%20with%20failure%20is%20easy%3A%20Work%20hard%20to%20improve.%20Success%20is%20also%20easy%20to%20handle%3A%20You've%20solved%20the%20wrong%20problem.%20Work%20hard%20to%20improve.%22%2C%22Within%20a%20computer%20natural%20language%20is%20unnatural.%22%2C%22You%20think%20you%20know%20when%20you%20learn%2C%20are%20more%20sure%20when%20you%20can%20write%2C%20even%20more%20when%20you%20can%20teach%2C%20but%20certain%20when%20you%20can%20program.%22%2C%22Adapting%20old%20programs%20to%20fit%20new%20machines%20usually%20means%20adapting%20new%20machines%20to%20behave%20like%20old%20ones.%22%2C%22A%20little%20learning%20is%20a%20dangerous%20thing.%22%2C%22Computer%20science%20education%20cannot%20make%20anybody%20an%20expert%20programmer%20any%20more%20than%20studying%20brushes%20and%20pigment%20can%20make%20somebody%20an%20expert%20painter.%22%2C%22Einstein%20argued%20that%20there%20must%20be%20simplified%20explanations%20of%20nature%2C%20because%20God%20is%20not%20capricious%20or%20arbitrary.%22%2C%22Students%20should%20be%20evaluated%20on%20how%20well%20they%20can%20achieve%20the%20goals%20they%20strived%20to%20achieve%20within%20a%20realistic%20context.%20Students%20need%20to%20learn%20to%20do%20things%2C%20not%20know%20things.%22%2C%22We%20remember%20what%20we%20learn%20when%20we%20care%20about%20performing%20better%20and%20when%20we%20believe%20that%20what%20we%20have%20been%20asked%20to%20do%20is%20representative%20of%20reality.%22%2C%22There%20really%20is%20no%20learning%20without%20doing.%22%2C%22We%20really%20have%20to%20get%20over%20the%20idea%20that%20some%20stuff%20is%20just%20worth%20knowing%20even%20if%20you%20never%20do%20anything%20with%20it.%20Human%20memories%20happily%20erase%20stuff%20that%20has%20no%20purpose%2C%20so%20why%20try%20to%20fill%20up%20children's%20heads%20with%20such%20stuff%3F%22%2C%22The%20only%20problems%20we%20can%20really%20solve%20in%20a%20satisfactory%20manner%20are%20those%20that%20finally%20admit%20a%20nicely%20factored%20solution.%22%2C%22The%20best%20way%20to%20learn%20to%20live%20with%20our%20limitations%20is%20to%20know%20them.%22%2C%22This%20challenge%2C%20viz.%20the%20confrontation%20with%20the%20programming%20task%2C%20is%20so%20unique%20that%20this%20novel%20experience%20can%20teach%20us%20a%20lot%20about%20ourselves.%20It%20should%20deepen%20our%20understanding%20of%20the%20processes%20of%20design%20and%20creation%2C%20it%20should%20give%20us%20better%20control%20over%20the%20task%20of%20organizing%20our%20thoughts.%20If%20it%20did%20not%20do%20so%2C%20to%20my%20taste%20we%20should%20no%20deserve%20the%20computer%20at%20all!%20%20It%20has%20allready%20taught%20us%20a%20few%20lessons%2C%20and%20the%20one%20I%20have%20chosen%20to%20stress%20in%20this%20talk%20is%20the%20following.%20We%20shall%20do%20a%20much%20better%20programming%20job%2C%20provided%20that%20we%20approach%20the%20task%20with%20a%20full%20appreciation%20of%20its%20tremenduous%20difficulty%2C%20provided%20that%20we%20stick%20to%20modest%20and%20elegant%20programming%20languages%2C%20provided%20that%20we%20respect%20the%20intrinsec%20limitations%20of%20the%20human%20mind%20and%20approach%20the%20task%20as%20Very%20Humble%20Programmers.%22%2C%22We%20now%20come%20to%20the%20decisive%20step%20of%20mathematical%20abstraction%3A%20we%20forget%20about%20what%20the%20symbols%20stand%20for.%20...%5BThe%20mathematician%5D%20need%20not%20be%20idle%3B%20there%20are%20many%20operations%20which%20he%20may%20carry%20out%20with%20these%20symbols%2C%20without%20ever%20having%20to%20look%20at%20the%20things%20they%20stand%20for.%22%2C%22An%20expert%20is%2C%20according%20to%20my%20working%20definition%20%5C%22someone%20who%20doesn't%20need%20to%20look%20up%20answers%20to%20easy%20questions%5C%22.%22%2C%22The%20programmer%20must%20seek%20both%20perfection%20of%20part%20and%20adequacy%20of%20collection.%22%2C%22Thus%2C%20programs%20must%20be%20written%20for%20people%20to%20read%2C%20and%20only%20incidentally%20for%20machines%20to%20execute.%22%2C%22We%20control%20complexity%20by%20building%20abstractions%20that%20hide%20details%20when%20appropriate.%20We%20control%20complexity%20by%20establishing%20conventional%20interfaces%20that%20enable%20us%20to%20construct%20systems%20by%20combining%20standard%2C%20well-understood%20pieces%20in%20a%20%5C%22mix%20and%20match%5C%22%20way.%20We%20control%20complexity%20by%20establishing%20new%20languages%20for%20describing%20a%20design%2C%20each%20of%20which%20emphasizes%20particular%20aspects%20of%20the%20design%20and%20deemphasizes%20others.%22%2C%22The%20acts%20of%20the%20mind%2C%20wherein%20it%20exerts%20its%20power%20over%20simple%20ideas%2C%20are%20chiefly%20these%20three%3A%201.%20Combining%20several%20simple%20ideas%20into%20one%20compound%20one%2C%20and%20thus%20all%20complex%20ideas%20are%20made.%202.%20The%20second%20is%20bringing%20two%20ideas%2C%20whether%20simple%20or%20complex%2C%20together%2C%20and%20setting%20them%20by%20one%20another%20so%20as%20to%20take%20a%20view%20of%20them%20at%20once%2C%20without%20uniting%20them%20into%20one%2C%20by%20which%20it%20gets%20all%20its%20ideas%20of%20relations.%203.%20The%20third%20is%20separating%20them%20from%20all%20other%20ideas%20that%20accompany%20them%20in%20their%20real%20existence%3A%20this%20is%20called%20abstraction%2C%20and%20thus%20all%20its%20general%20ideas%20are%20made.%22%2C%22Lisp%20programmers%20know%20the%20value%20of%20everything%20but%20the%20cost%20of%20nothing.%22%2C%22An%20interpreter%20raises%20the%20machine%20to%20the%20level%20of%20the%20user%20program%3B%20a%20compiler%20lowers%20the%20user%20program%20to%20the%20level%20of%20the%20machine%20language.%22%2C%22Everything%20should%20be%20made%20as%20simple%20as%20possible%2C%20but%20no%20simpler.%22%2C%22The%20great%20dividing%20line%20between%20success%20and%20failure%20can%20be%20expressed%20in%20five%20words%3A%20%5C%22I%20did%20not%20have%20time.%5C%22%22%2C%22When%20your%20enemy%20is%20making%20a%20very%20serious%20mistake%2C%20don't%20be%20impolite%20and%20disturb%20him.%22%2C%22A%20charlatan%20makes%20obscure%20what%20is%20clear%3B%20a%20thinker%20makes%20clear%20what%20is%20obscure.%22%2C%22There%20are%20two%20ways%20of%20constructing%20a%20software%20design%3B%20one%20way%20is%20to%20make%20it%20so%20simple%20that%20there%20are%20obviously%20no%20deficiencies%2C%20and%20the%20other%20way%20is%20to%20make%20it%20so%20complicated%20that%20there%20are%20no%20obvious%20deficiencies.%20The%20first%20method%20is%20far%20more%20difficult.
Related Skills
node-connect
335.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
82.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
335.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
82.5kCommit, push, and open a PR
