[{"data":1,"prerenderedAt":222},["ShallowReactive",2],{"project-9143665":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":40,"post_text":42,"what":43,"said":70,"maker_in_thread":139,"shape":144,"grid":149,"attempts":182,"same_week":183,"maker_shows":213,"maker_hidden":214,"reader_version":215,"card":216},"9143665","Fuzzy search","Fuzzy search in 400B of JavaScript","title","Show HN: Fuzzy search in 400B of JavaScript","https:\u002F\u002Fgithub.com\u002Fbevacqua\u002Ffuzzysearch","github.com","bevacqua",1425468561,2015,25,14,1043,2565,41,"shown","languages","javascript library","library",[24,25,26,27],"fuzzy search","javascript","string matching","autocomplete","roasted",-0.294,{"positive":31,"neutral":32,"mixed":33,"critical":34},0,4,1,5,10,{"idea":37,"execution":38,"performance":39},{"positive":31,"critical":32},{"positive":31,"critical":33},{"positive":31,"critical":31},[41,41,41,31,33,41,33,33,31,41,31,33,33,31],3,null,{"problem":44,"audience":51,"pricing":42,"motivation":55,"time_to_build":42,"stack":59,"openness":68,"stage":69,"team_size":69},{"value":45,"source":46,"evidence":47},"Matching query characters in order within a string, for client-side filtering like autocomplete","maker",[48],{"id":49,"by":11,"text":50},"9147014","OP here. My code is meant to be used for client-side bursty usage (like filtering results for an autocomplete list), which demands the code to be quick and small. In this use…",{"value":52,"source":46,"evidence":53},"Front-end developers doing client-side filtering",[54],{"id":49,"by":11,"text":50},{"value":56,"source":46,"evidence":57},"Small, quick client-side matching for bursty usage",[58],{"id":49,"by":11,"text":50},[60],{"value":61,"source":62,"evidence":63},"JavaScript","commenter",[64],{"id":65,"by":66,"text":67},"9146175","sync","Based on the first example, it seems a wee bit more complicated than that: ``` fuzzysearch('twl', 'cartwheel') \u002F\u002F \u003C- true ``` The string 'cartwheel' does not contain the string…","open_source","unknown",{"praise":71,"objections":86,"requests":114,"questions":119,"alternatives":128},[72,79],{"value":73,"source":62,"evidence":74},"Simple and clean implementation",[75],{"id":76,"by":77,"text":78},"9146144","acbart","So it's a \"string contains string\" function in Javascript? I mean, that's great, and this seems like a simple and clean implementation, but is it really worthy of a hacker news…",{"value":80,"source":62,"evidence":81},"Regex explanation of matching algorithm is concise",[82],{"id":83,"by":84,"text":85},"9159554","Guillaume86","Yes good catch. It's going to be a lot slower anyway. Still does a good job at explaining the matching algorithm concisely.",[87,95,106],{"value":88,"source":62,"evidence":89},"Is just an in-order character subsequence match, not really fuzzy search",[90,91],{"id":76,"by":77,"text":78},{"id":92,"by":93,"text":94},"9152900","kelseyfrancis","> In this use case, it's not necessary to figure out how similar strings are, because it's completely irrelevant. I don't follow, since that's pretty much the definition of…",{"value":96,"source":62,"evidence":97},"Regex approach breaks on special characters and is slower",[98,102,103],{"id":99,"by":100,"text":101},"9146872","mistercow","It's only the same as long as your search string doesn't contain any special characters as far as regex is concerned.",{"id":83,"by":84,"text":85},{"id":104,"by":11,"text":105},"9148157","Except egrigiously slower https:\u002F\u002Fgithub.com\u002Fbevacqua\u002Ffuzzysearch\u002Fpull\u002F6#issuecomment-77263900",{"value":107,"source":62,"evidence":108},"Does not handle typos or substitutions",[109,113],{"id":110,"by":111,"text":112},"9146586","solox3","I guess fuzzy search also allows for substitutions like \"csrtwheel\", but neither you nor the OP does this.",{"id":92,"by":93,"text":94},[115],{"value":116,"source":62,"evidence":117},"Support typo tolerance via edit distance",[118],{"id":92,"by":93,"text":94},[120],{"value":121,"source":62,"evidence":122},"Why not just use string contains or a regex",[123,124],{"id":76,"by":77,"text":78},{"id":125,"by":126,"text":127},"9146191","bshimmin","I think ``` new RegExp(\"twl\".split(\"\").join(\"(.+)?\")).test(\"cartwheel\") ``` does approximately the same, no?",[129,135],{"value":130,"source":62,"evidence":131},"Damerau-Levenshtein distance implementations",[132],{"id":133,"by":93,"text":134},"9146650","Yeah, anyone thinking of using this should probably instead just look for an existing implementation of something like the Damerau–Levenshtein distance.",{"value":136,"source":62,"evidence":137},"Levenshtein with a BK-Tree",[138],{"id":92,"by":93,"text":94},{"comments":140,"answered":33,"key":141},2,[142,143],{"id":49,"text":50},{"id":104,"text":105},{"commenters":145,"max_depth":146,"maker_replies":140,"first_comment_mins":147,"lifespan_hours":148},11,7,402,58,[150,152,153,155,158,160,162,164,165,169,173,175,179,180],[76,31,41,151,77,31],"project\u002Fneutral\u002Fidea",[65,31,41,151,66,31],[125,31,41,154,126,31],"project\u002Fneutral\u002Fexecution",[156,31,31,157,84,31],"9146256","commenter\u002Fneutral\u002Fexecution",[99,31,33,159,100,31],"project\u002Fcritical\u002Fexecution",[83,31,41,161,84,31],"project\u002Fmixed\u002Fperformance",[110,31,33,163,111,31],"project\u002Fcritical\u002Fidea",[133,31,33,163,93,31],[166,31,31,167,168,31],"9146802","commenter\u002Fcritical\u002Fnone","logicallee",[170,31,41,171,172,31],"9146975","project\u002Fneutral\u002Fperformance","jgalt212",[49,31,31,174,11,33],"maker\u002Fneutral\u002Fidea",[176,31,33,177,178,31],"9148709","maker\u002Fcritical\u002Fidea","magoon",[92,31,33,163,93,31],[104,31,31,181,11,33],"project\u002Fcritical\u002Fperformance",[],[184,189,193,198,203,208],{"id":185,"name":186,"points":187,"category":188},"9144271","OpenLoopz",373,"productivity",{"id":190,"name":191,"points":192,"category":188},"9145007","Ghostnote",301,{"id":194,"name":195,"points":196,"category":197},"9131706","Circles, Sines & Signals",293,"learning_science",{"id":199,"name":200,"points":201,"category":202},"9112803","GitHub Awards",137,"dev_tools",{"id":204,"name":205,"points":206,"category":207},"9117238","grack.com",134,"creative",{"id":209,"name":210,"points":211,"category":212},"9118491","Paz",90,"infrastructure",8,false,"v2",{"id":217,"name":5,"line":6,"ai":214,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":218,"top":18,"kw":219,"maker":11,"domain":10,"tier":19,"attempts":31,"strip":220,"url":9,"mix":221,"praise":73,"objection":88,"sub":21},9143665,-0.29,[24,25,26,27],"33301311030110",[31,32,33,34],1794036528990]