tools/changelog.js
function categorizeCommits(rawCommits) {

    const categorizedCommits = {};

    // create a bucket of rawCommits by type:
    // { fixes: [], upgrades: [], breaking: [] }
    rawCommits.forEach(function(commit) {

        const capType = capitalize(commit.type);

        if (!categorizedCommits.hasOwnProperty(capType)) {
            categorizedCommits[capType] = [];
        }

        categorizedCommits[capType].push(commit);
    });

    return categorizedCommits;
}
function categorizeCommits(rawCommits) {

    const categorizedCommits = {};

    // create a bucket of rawCommits by type:
    // { fixes: [], upgrades: [], breaking: [] }
    rawCommits.forEach(function(commit) {

        const capType = capitalize(commit.type);

        if (!categorizedCommits.hasOwnProperty(capType)) {
            categorizedCommits[capType] = [];
        }

        categorizedCommits[capType].push(commit);
    });

    return categorizedCommits;
}
function categorizeCommits ( rawCommits ) { const categorizedCommits = { } ; // create a bucket of rawCommits by type: // { fixes: [], upgrades: [], breaking: [] } rawCommits . forEach ( function ( commit ) { const capType = capitalize ( commit . type ) ; if ( ! categorizedCommits . hasOwnProperty ( capType ) ) { categorizedCommits [ capType ] = [ ] ; } categorizedCommits [ capType ] . push ( commit ) ; } ) ; return categorizedCommits ; }
categorize raw commits into types of commits for consumption into md.
@function categorizeCommits
@param {Array} rawCommits array of objects describing commits
@return {Object}
categorize raw commits into types of commits for consumption into md .