• foonyah.each(obj, fn)

          Iterate the object ( including <Array> ) obj and execute the function fn for each value in the object. The key is give to 1st argument for the function fn and the value is given to 2nd argument. If return false, stop the iterating.
          • _

            var f = window.foonyah;
            var obj = { a: 1, b: 2, c: 3 };
            f.each(obj, function(k, v) {
            console.log(k + ':' + v);
            return k != 'b';
            });
            // a:1
            // b:2

        • foonyah.isFunction(x)

          Judge the type of x is <Function> or not.
          var f = widow.foonyah;
          var x = Function(), y = {}, z = [];
          console.log(f.isFunction(x), f.isFunction(y), f.isFunction(z))
          // true, false, false

          • _

            var f = window.foonyah;
            var x = Function(), y = {}, z = [];
            console.log(f.isFunction(x), f.isFunction(y), f.isFunction(z))
            // true, false, false

        • foonyah.isArray(x)

          Judge the type of x is <Array> (NOT including <Object>) or not.
          var f = widow.foonyah;
          var x = Function(), y = {}, z = [];
          console.log(f.isArray(x), f.isArray(y), f.isArray(z))
          // false, false, true

          • _

            var f = window.foonyah;
            var x = Function(), y = {}, z = [];
            console.log(f.isArray(x), f.isArray(y), f.isArray(z))
            // false, false, true

        • foonyah.isPlainObject(x)

          Judge the type of x is <key-value Object> (NOT including some instance, null) or not.
          var f = widow.foonyah;
          var x = Function(), y = {}, z = new Function();
          console.log(f.isPlainObject(x), f.isPlainObject(y), f.isPlainObject(z))
          // false, true, false

          • _

            var f = window.foonyah;
            var x =null, y = {}, z = new Function();
            console.log(f.isPlainObject(x), f.isPlainObject(y), f.isPlainObject(z))
            // false, true, false

        • foonyah.type(x)

          Return the type of x with some extended type compare with JavaScript typeof.

          f.typeof(undefined)undefined
          f.typeof(null)null
          f.typeof('ABC')string
          f.typeof(123)number
          f.typeof(function(){ })function
          f.typeof({})object
          f.typeof([])array
          f.typeof(new f.Emitter())object
          var f = widow.foonyah;
          var x = Function(), y = {}, z = null
          console.log(f.type(x), f.type(y), f.type(z))
          // false, true, false

          • _

            f.typeof(undefined)undefined
            f.typeof(null)null
            f.typeof('ABC')string
            f.typeof(123)number
            f.typeof(function(){ })function
            f.typeof({})object
            f.typeof([])array
            f.typeof(new f.Emitter())object
            var f = window.foonyah;
            var x = Function(), y = {}, z = null
            console.log(f.type(x), f.type(y), f.type(z))
            // false, true, false

        • foonyah.is(type, x)

          Judge the type of x equals type.
          If x is an jQuery wrapped object, type is treated as an selector and returns jQuery.fn.is(type) result.
          • _

            var f = window.foonyah;
            var x = Function();
            console.log(f.is('function', x), f.is('object', x), f.is('div', $('<div/>')))
            // true, false, true

        • foonyah.noop(x)

          Returns no-operation function. ( feature: with returns x or undefined. )
          var f = widow.foonyah;
          console.log(f.noop()());
          console.log(f.noop(1)()); // next feature
          // undefined
          // 1

          • _

            var f = window.foonyah;
            console.log(f.noop()());
            console.log(f.noop(1)()); // next feature
            // undefined
            // 1

        • foonyah.es6promise(x)

          • _

            var f = window.foonyah;
            var x = $.Deferred();
            /* You can use Ecma Script Promise chain after the wrap. */
            f.es6promise(x.promise()).then(function(){
            return new Promise(function(rsl){
            setTimeout(rsl, 3000);
            });
            })['catch'](fucntion(e){
            // error handling
            console.log(e);
            });
        • foonyah.jquerify(x)

          • _

            var f = window.foonyah;
            var x = new Promise(function(rsl){ setTimeout(rsl, 3000) });
            // You can use jQuery.Deferred chain after the wrap.
            f.jquerify(x).pipe(function(){
            return $.Deferred().resolve()
            }).progress(function(){
            // some notification receiver
            console.log(arguments);
            });
        • foonyah.funcStringify(fn, replace, options)

          Convert a function fn to string with using word-map replace.
          • _

            var f = window.foonyah;
            var x = function() { console.log('a') }
            console.log(f.funcStringify(x));
            // console.log('a')