aboutsummaryrefslogtreecommitdiffstats
path: root/logic.js
blob: 98fdf8d9eee504da1ee24d66db58d33217422fb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module.exports.integrateGIF = function (gif, song) {
    song.gifs.push(gif)
};

module.exports.checkOverlap = function(gif, song) {
    for (var g in song.gifs) {
        if ((gif.timestamp > g.timestamp) && 
            (gif.timestamp < g.timestamp + 3)) {
            
            return true;
        }
    }

    return false;
};