lib/subtract.js
function getBorders(ranges) {
    var borders = [];

    ranges.forEach(function(range) {
        var leftBorder = { value: range.from, type: 'from' };
        var rightBorder = { value: range.to, type: 'to' };

        borders.push(leftBorder, rightBorder);
    });

    return borders;
}
function getBorders(ranges) {
    var borders = [];

    ranges.forEach(function(range) {
        var leftBorder = { value: range.from, type: 'from' };
        var rightBorder = { value: range.to, type: 'to' };

        borders.push(leftBorder, rightBorder);
    });

    return borders;
}
function getBorders ( ranges ) { var borders = [ ] ; ranges . forEach ( function ( range ) { var leftBorder = { value : range . from , type : 'from' } ; var rightBorder = { value : range . to , type : 'to' } ; borders . push ( leftBorder , rightBorder ) ; } ) ; return borders ; }
Returns borders of ranges.

@param {{from: number, to: number}} ranges — the source ranges.

@returns {{value: number, type: string}}
Returns borders of ranges .