(function($) {

    $.fn.domFilterText = function (options) {
        let opts = $.extend(true, {}, $.fn.domFilterText.defaults, options);

        let cacheCss = (targets) => {
            targets.each(i => {
                $(this).data('display', $(this).css('display'));
            });

            if (targets.children().length) {
                cacheCss(targets.children());
            }
        };

        cacheCss(opts.filterTarget);

        return this.each(i => {
            if (this.nodeName.toLowerCase() !== 'input' || this.type.toLowerCase() !== 'text') {
                console.warn(`(this.id ? this.id : 'Node') type is invalid, use <input type='text'> instead.`);
                return false;
            }

            $(this).on('keyup', (e) => {
                let filterVal = $(e.target).val();

                let filter = (targets) => {
                    targets.each( i => {
                        $(this).css('display', $(this).data('display'));
                    });

                    let targetRemove = targets.filter(() => {
                        let comparator = '';

                        if (opts.filterProperty === 'html') {
                            comparator = $(this).html();
                        } else {
                            comparator = $(this).filterProperty;
                        }

                        if (opts.caseSensitive) {
                            return comparator.indexOf(filterVal) < 0;
                        } else {
                            return comparator.toLowerCase().indexOf(filterVal.toLowerCase()) < 0;
                        }
                    });

                    targetRemove.not(e.target).css('display', 'none');

                    if (targets.children().length) {
                        filter(targets.children());
                    }
                };

                filter(opts.filterTarget);
            });
        });
    };


    $.fn.domFilterText.defaults = {
        filterTarget: $(document.body),
        filterProperty: 'html',
        caseSensitive: false
    };

}(jQuery));
@@ -51,24 +51,49 @@
 (options) %7B%0A
+        let self = this;%0A
         let 
@@ -217,25 +217,31 @@
 argets.each(
-i
+(i, el)
  =%3E %7B%0A      
@@ -252,20 +252,18 @@
       $(
-this
+el
 ).data('
@@ -274,20 +274,18 @@
 lay', $(
-this
+el
 ).css('d
@@ -486,19 +486,25 @@
 urn 
-this
+self
 .each(
-i
+(i, el)
  =%3E 
@@ -521,20 +521,18 @@
     if (
-this
+el
 .nodeNam
@@ -562,20 +562,18 @@
 put' %7C%7C 
-this
+el
 .type.to
@@ -633,22 +633,18 @@
 n(%60(
-this
+el
 .id ? 
-this
+el
 .id 
@@ -765,20 +765,20 @@
       $(
-this
+self
 ).on('ke
@@ -921,18 +921,23 @@
 ts.each(
- i
+(i, el)
  =%3E %7B%0A  
@@ -960,20 +960,18 @@
       $(
-this
+el
 ).css('d
@@ -981,20 +981,18 @@
 lay', $(
-this
+el
 ).data('
@@ -1083,16 +1083,21 @@
 filter((
+i, el
 ) =%3E %7B%0A 
@@ -1246,20 +1246,18 @@
 tor = $(
-this
+el
 ).html()
@@ -1334,20 +1334,18 @@
 tor = $(
-this
+el
 ).filter

add babel version