example/dist/production.js
function(expr, options) {
                    // Check if this is a list or a compute that resolves to a list, and setup
                    // the incremental live-binding 

                    // First, see what we are dealing with.  It's ok to read the compute
                    // because can.view.text is only temporarily binding to what is going on here.
                    // Calling can.view.lists prevents anything from listening on that compute.
                    var resolved = Mustache.resolve(expr),
                        result = [],
                        keys,
                        key,
                        i;

                    // When resolved === undefined, the property hasn't been defined yet
                    // Assume it is intended to be a list
                    if (can.view.lists && (resolved instanceof can.List || (expr && expr.isComputed && resolved === undefined))) {
                        return can.view.lists(expr, function(item, index) {
                            return options.fn(options.scope.add({
                                        "@index": index
                                    })
                                .add(item));
                        });
                    }
                    expr = resolved;

                    if ( !! expr && isArrayLike(expr)) {
                        for (i = 0; i < expr.length; i++) {
                            result.push(options.fn(options.scope.add({
                                            "@index": i
                                        })
                                    .add(expr[i])));
                        }
                        return result.join('');
                    } else if (isObserveLike(expr)) {
                        keys = can.Map.keys(expr);
                        // listen to keys changing so we can livebind lists of attributes.

                        for (i = 0; i < keys.length; i++) {
                            key = keys[i];
                            result.push(options.fn(options.scope.add({
                                            "@key": key
                                        })
                                    .add(expr[key])));
                        }
                        return result.join('');
                    } else if (expr instanceof Object) {
                        for (key in expr) {
                            result.push(options.fn(options.scope.add({
                                            "@key": key
                                        })
                                    .add(expr[key])));
                        }
                        return result.join('');

                    }
                }
function(expr, options) {
                    // Check if this is a list or a compute that resolves to a list, and setup
                    // the incremental live-binding 

                    // First, see what we are dealing with.  It's ok to read the compute
                    // because can.view.text is only temporarily binding to what is going on here.
                    // Calling can.view.lists prevents anything from listening on that compute.
                    var resolved = Mustache.resolve(expr),
                        result = [],
                        keys,
                        key,
                        i;

                    // When resolved === undefined, the property hasn't been defined yet
                    // Assume it is intended to be a list
                    if (can.view.lists && (resolved instanceof can.List || (expr && expr.isComputed && resolved === undefined))) {
                        return can.view.lists(expr, function(item, index) {
                            return options.fn(options.scope.add({
                                        "@index": index
                                    })
                                .add(item));
                        });
                    }
                    expr = resolved;

                    if ( !! expr && isArrayLike(expr)) {
                        for (i = 0; i < expr.length; i++) {
                            result.push(options.fn(options.scope.add({
                                            "@index": i
                                        })
                                    .add(expr[i])));
                        }
                        return result.join('');
                    } else if (isObserveLike(expr)) {
                        keys = can.Map.keys(expr);
                        // listen to keys changing so we can livebind lists of attributes.

                        for (i = 0; i < keys.length; i++) {
                            key = keys[i];
                            result.push(options.fn(options.scope.add({
                                            "@key": key
                                        })
                                    .add(expr[key])));
                        }
                        return result.join('');
                    } else if (expr instanceof Object) {
                        for (key in expr) {
                            result.push(options.fn(options.scope.add({
                                            "@key": key
                                        })
                                    .add(expr[key])));
                        }
                        return result.join('');

                    }
                }
function ( expr , options ) { // Check if this is a list or a compute that resolves to a list, and setup // the incremental live-binding  // First, see what we are dealing with.  It's ok to read the compute // because can.view.text is only temporarily binding to what is going on here. // Calling can.view.lists prevents anything from listening on that compute. var resolved = Mustache . resolve ( expr ) , result = [ ] , keys , key , i ; // When resolved === undefined, the property hasn't been defined yet // Assume it is intended to be a list if ( can . view . lists && ( resolved instanceof can . List || ( expr && expr . isComputed && resolved === undefined ) ) ) { return can . view . lists ( expr , function ( item , index ) { return options . fn ( options . scope . add ( { "@index" : index } ) . add ( item ) ) ; } ) ; } expr = resolved ; if ( ! ! expr && isArrayLike ( expr ) ) { for ( i = 0 ; i < expr . length ; i ++ ) { result . push ( options . fn ( options . scope . add ( { "@index" : i } ) . add ( expr [ i ] ) ) ) ; } return result . join ( '' ) ; } else if ( isObserveLike ( expr ) ) { keys = can . Map . keys ( expr ) ; // listen to keys changing so we can livebind lists of attributes. for ( i = 0 ; i < keys . length ; i ++ ) { key = keys [ i ] ; result . push ( options . fn ( options . scope . add ( { "@key" : key } ) . add ( expr [ key ] ) ) ) ; } return result . join ( '' ) ; } else if ( expr instanceof Object ) { for ( key in expr ) { result . push ( options . fn ( options . scope . add ( { "@key" : key } ) . add ( expr [ key ] ) ) ) ; } return result . join ( '' ) ; } }
Implements the `each` built-in helper.
Implements the each built - in helper .