build/moon-unit.js
function(obj) {

        if (Array.isArray(obj)) {

            return {

                at: function(skip, pos) { return obj[pos] },
                rest: function(skip, pos) { return obj.slice(pos) }
            };
        }

        var iter = toObject(obj)[Symbol.iterator]();

        return {

            at: function(skip) {

                var r;

                while (skip--)
                    r = iter.next();

                return r.value;
            },

            rest: function(skip) {

                var a = [], r;

                while (--skip)
                    r = iter.next();

                while (r = iter.next(), !r.done)
                    a.push(r.value);

                return a;
            }
        };
    }
function(obj) {

        if (Array.isArray(obj)) {

            return {

                at: function(skip, pos) { return obj[pos] },
                rest: function(skip, pos) { return obj.slice(pos) }
            };
        }

        var iter = toObject(obj)[Symbol.iterator]();

        return {

            at: function(skip) {

                var r;

                while (skip--)
                    r = iter.next();

                return r.value;
            },

            rest: function(skip) {

                var a = [], r;

                while (--skip)
                    r = iter.next();

                while (r = iter.next(), !r.done)
                    a.push(r.value);

                return a;
            }
        };
    }
function ( obj ) { if ( Array . isArray ( obj ) ) { return { at : function ( skip , pos ) { return obj [ pos ] } , rest : function ( skip , pos ) { return obj . slice ( pos ) } } ; } var iter = toObject ( obj ) [ Symbol . iterator ] ( ) ; return { at : function ( skip ) { var r ; while ( skip -- ) r = iter . next ( ) ; return r . value ; } , rest : function ( skip ) { var a = [ ] , r ; while ( -- skip ) r = iter . next ( ) ; while ( r = iter . next ( ) , ! r . done ) a . push ( r . value ) ; return a ; } } ; }
Support for array destructuring
Support for array destructuring