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)
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 520 524" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><rect id="head" x="0" y="0" width="519.66" height="523.399" style="fill:none;"/><g><path d="M223.621,10.151c149.911,-22.108 266.464,79.957 286.166,217.906c19.702,137.95 -76.299,265.942 -214.248,285.644c-137.95,19.702 -265.942,-76.299 -285.644,-214.248c-18.56,-129.947 63.815,-267.194 213.726,-289.302Z" style="fill:#ffe676;"/><path d="M77.282,85.164c-25.295,48.055 -35.282,103.874 -27.494,158.407c19.702,137.95 147.695,233.951 285.644,214.249c58.857,-8.406 110.079,-36.525 147.935,-76.72c-36.456,69.27 -104.487,120.698 -187.828,132.601c-137.95,19.702 -265.942,-76.299 -285.644,-214.248c-11.067,-77.488 13.756,-157.571 67.387,-214.289Z" style="fill:#ffd95e;"/></g></svg>
SHIFT+ALT+I
to make it obvious.
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;
```