{"size": 557, "ext": "js", "max_stars_repo_path": "dist/chunk.js", "max_stars_repo_name": "dractw/arkecosystem-utils", "max_stars_repo_stars_event_min_datetime": "2020-10-29T15:29:00.000Z", "max_stars_repo_stars_event_max_datetime": "2020-10-29T15:29:00.000Z", "max_issues_repo_path": "dist/chunk.js", "max_issues_repo_name": "dractw/arkecosystem-utils", "max_issues_repo_issues_event_min_datetime": "2021-04-18T15:20:56.000Z", "max_issues_repo_issues_event_max_datetime": "2021-07-19T08:50:17.000Z", "max_forks_repo_path": "dist/chunk.js", "max_forks_repo_name": "dractw/arkecosystem-utils", "max_forks_repo_forks_event_min_datetime": "2020-12-14T11:01:02.000Z", "max_forks_repo_forks_event_max_datetime": "2020-12-14T11:01:02.000Z"}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 32.7647058824, "max_line_length": 82, "alphanum_fraction": 0.6391382406}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const slice_1 = require("./slice");
exports.chunk = (iterable, chunkSize) => {
    const iterableLength = iterable.length;
    if (!iterableLength || chunkSize <= 0) {
        return [];
    }
    let index = 0;
    let resIndex = 0;
    const result = Array(Math.ceil(iterableLength / chunkSize));
    while (index < iterableLength) {
        result[resIndex++] = slice_1.slice(iterable, index, (index += chunkSize));
    }
    return result;
};
//# sourceMappingURL=chunk.js.map