{"size": 787, "ext": "js", "max_stars_repo_path": "test/fixtures/helpers.js", "max_stars_repo_name": "sylvainemery/browser-sync", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "test/fixtures/helpers.js", "max_issues_repo_name": "sylvainemery/browser-sync", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test/fixtures/helpers.js", "max_forks_repo_name": "sylvainemery/browser-sync", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.675, "max_line_length": 97, "alphanum_fraction": 0.4777636595}
/**
 *
 * Helper to abstract scroll events
 * http://yuilibrary.com/yui/docs/event/simulate.html
 * @param distance
 * @param cb
 */
var simulateScroll = function (distance, delay, cb) {

    /**
     *
     * Since iOS only sends scroll event when the touch has stopped, we need to simulate it here.
     *
     */
    if ("ontouchstart" in window) {


        YUI().use('node-event-simulate', function(Y) {

            var node = Y.one(window);
            node.simulateGesture("move", {
                path: {
                    xdist: 0,
                    ydist: distance
                } ,
                duration: 100
            });

            // For wrapping tests
            cb()

        });

    } else {

        window.scrollTo(0, distance);

        cb();
    }
}