<!DOCTYPE html>  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< html  lang = "en" >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< head >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								    < meta  charset = "utf-8" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								    < title > JSDoc: Home< / title > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								    < script  src = "scripts/prettify/prettify.js" >  < / script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								    < script  src = "scripts/prettify/lang-css.js" >  < / script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								    <!-- [if lt IE 9]>
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								      < script  src = "//html5shiv.googlecode.com/svn/trunk/html5.js" > < / script > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								    <![endif]--> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								    < link  type = "text/css"  rel = "stylesheet"  href = "styles/prettify-tomorrow.css" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								    < link  type = "text/css"  rel = "stylesheet"  href = "styles/jsdoc-default.css" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< / head >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< body >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< div  id = "main" >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								    < h1  class = "page-title" > Home< / h1 > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								    
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								    
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								    < h3 >  < / h3 > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								    
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								    < section > 
							 
						 
					
						
							
								
							 
							
								
									
										 
								
							 
							
								 
							
								        < article > < h1 > Fuse< / h1 > < p > < strong > FunctionSelect< / strong > < / p > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< p > < code > Fuse< / code >  selects a function that passes a condition.< / p >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< h2 > Usage< / h2 > < pre  class = "prettyprint source lang-JavaScript" > < code > const Fuse = require('@codefeathers/fuse'); 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								const { FuseIterable } = require('@codefeathers/fuse');
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
									
										 
								
							 
							
								 
							
								const a = 100;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								const result = new Fuse(a)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								    .on(x => x>10,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								        a => `${a} is greater than 10.`)
							 
						 
					
						
							
								
							 
							
								
									
										 
								
							 
							
								 
							
								    .on(x => x< 10,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								        a => `${a} is lesser than 10.`)
							 
						 
					
						
							
								
							 
							
								
									
										 
								
							 
							
								 
							
								    .on(x => x===10,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								        a => `${a} is 10.`)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								console.log(result.resolve()); // -> " 100 is greater than 10." < / code > < / pre > < h2 > Docs< / h2 > < p > Docs exist in < code > /docs< / code >  directory. Will be served soon.< / p > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< h2 > Development< / h2 > < blockquote >  
						 
					
						
							
								
							 
							
								
									
										 
								
							 
							
								 
							
								< p > If you find any mistakes in code/documentation, or if you feel something could be done better, do PR :)  I appreciate it.< / p >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< / blockquote >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< ul >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< li > Always write test spec for any code you add. Make sure they run as intended.< / li >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< li > Add/update JSDoc comments as needed.< / li >  
						 
					
						
							
								
							 
							
								
									
										 
								
							 
							
								 
							
								< li > Use npm scripts for linting, tests, debugging, building docs.< / li >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< / ul >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< p > Place your test file as < code > testscript.js< / code >  in root.< / p >  
						 
					
						
							
								
							 
							
								
									
										 
								
							 
							
								 
							
								< p > The following npm scripts are available: < code > npm run lint< / code > , < code > npm test< / code > , < code > npm run debug< / code > , < code > npm run docs< / code > .< / p >  
						 
					
						
							
								
							 
							
								
									
										 
								
							 
							
								 
							
								< h2 > Credits< / h2 > < p > < a  href = "https://github.com/Floofies" > @Floofies< / a >  was of huge help during development of this module.< / p >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< p > Also, < a  href = "https://github.com/trgwii" > @TRGWII< / a >  was a source of inspiration and guidance.< / p > < / article >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								    < / section > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< / div >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< nav >  
						 
					
						
							
								
							 
							
								
									
										 
								
							 
							
								 
							
								    < h2 > < a  href = "index.html" > Home< / a > < / h2 > < h3 > Classes< / h3 > < ul > < li > < a  href = "Fuse.html" > Fuse< / a > < / li > < li > < a  href = "FuseItem.html" > FuseItem< / a > < / li > < li > < a  href = "FuseIterable.html" > FuseIterable< / a > < / li > < / ul > < h3 > < a  href = "global.html" > Global< / a > < / h3 > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< / nav >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< br  class = "clear" >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< footer >  
						 
					
						
							
								
							 
							
								
									
										 
								
							 
							
								 
							
								    Documentation generated by < a  href = "https://github.com/jsdoc3/jsdoc" > JSDoc 3.5.5< / a >  on Wed Apr 11 2018 11:02:55 GMT+0530 (IST)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< / footer >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< script >  prettyPrint ( ) ;  < / script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< script  src = "scripts/linenumber.js" >  < / script >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< / body >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								< / html >