• foonyah.each(obj, fn)

          Iterate the object ( including <Array> ) obj and execute the function fn for each key-value set 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 = 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 = 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 = 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 = window.foonyah;
            var x = Function(), y = {}, z = null
            console.log(f.type(x), f.type(y), f.type(z))
            // function, object, null

        • 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.
          types are not only foonyah.type strings but "plainobject" judged by foonyah.isPlainObject.
          • _

            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 = window.foonyah;
            console.log(f.noop()());
            console.log(f.noop(1)()); // support >= v0.9.3r160314
            // 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){
            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(){
            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')