FatFingerJS

Daniel Temkin, 2017

on GitHub


FatFinger is a JavaScript library expanding JS to allow typos and misspellings as valid code. Why bother with clean, well-formatted JS when you can write this and FatFinger will guess at your intentions?


        <script type="text/javascript" src="fatfinger.js"></script>
        <script type="text/javoscript">
            // any misspelling of javascript works in the type attribute above
            vart x = "herrrllo werld"
            dokkkkumint.rit3(xx)
        </script>
    

Don't bother with semi-colons. Open brackets and never close them. Misspell keywords, variables, and functions.

Why?

Test out your code:

INPUT (FatFinger-style JS)




Errors:

OUTPUT (conventional JavaScript)

SYNTAX TREE


How To Use

Include fatfinger.js in your project, add a script tag with any misspelling of JavaScript containing your FatFingered code. You'll need to declare all your vars as if option explicit; FatFinger assumes implicit declarations are actually misspelled statements. FatFinger has a poor concept of scope, so if you're doing fancy OO stuff, ask yourself: is there a good reason I haven't made everything global??? If not, this might not be the right library / coding style for you.

See Also

Previous Languages


See more here