public/javascripts/nodegame-full.js
function generalLike(d, value, comparator, sensitive) {
            var regex;

            RegExp.escape = function(str) {
                return str.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
            };

            regex = RegExp.escape(value);
            regex = regex.replace(/%/g, '.*').replace(/_/g, '.');
            regex = new RegExp('^' + regex + '$', sensitive);

            if ('object' === typeof d) {
                return function(elem) {
                    var i, len;
                    len = d.length;
                    for (i = 0; i < len; i++) {
                        if ('undefined' !== typeof elem[d[i]]) {
                            if (regex.test(elem[d[i]])) {
                                return elem;
                            }
                        }
                    }
                };
            }
            else if (d === '*') {
                return function(elem) {
                    var d;
                    for (d in elem) {
                        if ('undefined' !== typeof elem[d]) {
                            if (regex.test(elem[d])) {
                                return elem;
                            }
                        }
                    }
                };
            }
            else {
                return function(elem) {
                    if ('undefined' !== typeof elem[d]) {
                        if (regex.test(elem[d])) {
                            return elem;
                        }
                    }
                };
            }
        }
function generalLike(d, value, comparator, sensitive) {
            var regex;

            RegExp.escape = function(str) {
                return str.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
            };

            regex = RegExp.escape(value);
            regex = regex.replace(/%/g, '.*').replace(/_/g, '.');
            regex = new RegExp('^' + regex + '$', sensitive);

            if ('object' === typeof d) {
                return function(elem) {
                    var i, len;
                    len = d.length;
                    for (i = 0; i < len; i++) {
                        if ('undefined' !== typeof elem[d[i]]) {
                            if (regex.test(elem[d[i]])) {
                                return elem;
                            }
                        }
                    }
                };
            }
            else if (d === '*') {
                return function(elem) {
                    var d;
                    for (d in elem) {
                        if ('undefined' !== typeof elem[d]) {
                            if (regex.test(elem[d])) {
                                return elem;
                            }
                        }
                    }
                };
            }
            else {
                return function(elem) {
                    if ('undefined' !== typeof elem[d]) {
                        if (regex.test(elem[d])) {
                            return elem;
                        }
                    }
                };
            }
        }
function generalLike ( d , value , comparator , sensitive ) { var regex ; RegExp . escape = function ( str ) { return str . replace ( / ([.*+?^=!:${}()|[\]\/\\]) / g , '\\$1' ) ; } ; regex = RegExp . escape ( value ) ; regex = regex . replace ( / % / g , '.*' ) . replace ( / _ / g , '.' ) ; regex = new RegExp ( '^' + regex + '$' , sensitive ) ; if ( 'object' === typeof d ) { return function ( elem ) { var i , len ; len = d . length ; for ( i = 0 ; i < len ; i ++ ) { if ( 'undefined' !== typeof elem [ d [ i ] ] ) { if ( regex . test ( elem [ d [ i ] ] ) ) { return elem ; } } } } ; } else if ( d === '*' ) { return function ( elem ) { var d ; for ( d in elem ) { if ( 'undefined' !== typeof elem [ d ] ) { if ( regex . test ( elem [ d ] ) ) { return elem ; } } } } ; } else { return function ( elem ) { if ( 'undefined' !== typeof elem [ d ] ) { if ( regex . test ( elem [ d ] ) ) { return elem ; } } } ; } }
Supports `_` and `%` wildcards.
Supports _ and % wildcards .