if Ruby and React had an indentation based lovechild, what would it look like? Imba is a new programming language for the web that compiles to performant and readable JavaScript.
somebee on master
Reset Stack.tag before each com… Bump version to 1.4.2 (compare)
somebee on master
Lookup event handlers up the ow… (compare)
somebee on master
Reset rewriter between runs Merge branch 'master' of https:… (compare)
Error: TypeError: node.c is not a function
at Object.eval (VM2234 exe1.bundle.js:2)
at a.execute (VM2224 cached-__sw__tracker-e3d9fade408155f32abb.js:1937)
at a.finalExports (VM2224 cached-__sw__tracker-e3d9fade408155f32abb.js:1941)
at s.moduleResult (VM2224 cached-__sw__tracker-e3d9fade408155f32abb.js:1972)
at ModuleLoader.import (VM2224 cached-__sw__tracker-e3d9fade408155f32abb.js:1883)
at async https:/scrimba.com/assets/cached-__sw__tracker-e3d9fade408155f32abb.js:1572
<input[#context.search]>
?
Can anyone help me convert this fuzzy search function to imba syntax? I'm getting too many errors. Maybe someone can help me do it well. I'm not sure how to get around the outer
part.
'use strict';
function fuzzysearch (needle, haystack) {
var tlen = haystack.length;
var qlen = needle.length;
if (qlen > tlen) {
return false;
}
if (qlen === tlen) {
return needle === haystack;
}
outer: for (var i = 0, j = 0; i < qlen; i++) {
var nch = needle.charCodeAt(i);
while (j < tlen) {
if (haystack.charCodeAt(j++) === nch) {
continue outer;
}
}
return false;
}
return true;
}
module.exports = fuzzysearch;
```
Have you seen this? https://externos.io/
I think this could be a good showcase for imba, going to try it this weekend.