code: function makePredicate(words) {
        if (!(words instanceof Array)) words = words.split(" ");
        var f = "", cats = [];
        out: for (var i = 0; i < words.length; ++i) {
            for (var j = 0; j < cats.length; ++j)
                if (cats[j][0].length == words[i].length) {
                    cats[j].push(words[i]);
                    continue out;
                }
            cats.push([words[i]]);
        }
        function quote(word) {
            return JSON.stringify(word).replace(/[\u2028\u2029]/g, function(s) {
                switch (s) {
                    case "\u2028": return "\\u2028";
                    case "\u2029": return "\\u2029";
                }
                return s;
            });
        }
        function compareTo(arr) {
            if (arr.length == 1) return f += "return str === " + quote(arr[0]) + ";";
            f += "switch(str){";
            for (var i = 0; i < arr.length; ++i) f += "case " + quote(arr[i]) + ":";
            f += "return true}return false;";
        }
        // When there are more than three length categories, an outer
        // switch first dispatches on the lengths, to save on comparisons.
        if (cats.length > 3) {
            cats.sort(function(a, b) {return b.length - a.length;});
            f += "switch(str.length){";
            for (var i = 0; i < cats.length; ++i) {
                var cat = cats[i];
                f += "case " + cat[0].length + ":";
                compareTo(cat);
            }
            f += "}";
            // Otherwise, simply generate a flat `switch` statement.
        } else {
            compareTo(words);
        }
        return new Function("str", f);
    }
docs: this function is taken from Acorn [1], written by Marijn Haverbeke [1] https://github.com/marijnh/acorn