lib/util.js
function isNewerThan( inputs, target ) {
    if ( !FS.existsSync( target ) ) return true;

    const files = Array.isArray( inputs ) ? inputs : [ inputs ],
          statTarget = FS.statSync( target ),
          targetTime = statTarget.mtime;

    for ( const file of files ) {
        if ( !FS.existsSync( file ) ) continue;

        const stat = FS.statSync( file );
        if ( stat.mtime > targetTime ) {
            return true;
        }
    }
    return false;
}
function isNewerThan( inputs, target ) {
    if ( !FS.existsSync( target ) ) return true;

    const files = Array.isArray( inputs ) ? inputs : [ inputs ],
          statTarget = FS.statSync( target ),
          targetTime = statTarget.mtime;

    for ( const file of files ) {
        if ( !FS.existsSync( file ) ) continue;

        const stat = FS.statSync( file );
        if ( stat.mtime > targetTime ) {
            return true;
        }
    }
    return false;
}
function isNewerThan ( inputs , target ) { if ( ! FS . existsSync ( target ) ) return true ; const files = Array . isArray ( inputs ) ? inputs : [ inputs ] , statTarget = FS . statSync ( target ) , targetTime = statTarget . mtime ; for ( const file of files ) { if ( ! FS . existsSync ( file ) ) continue ; const stat = FS . statSync ( file ) ; if ( stat . mtime > targetTime ) { return true ; } } return false ; }
Check if at least one file is newer than the target one.

@param {array}  inputs - Array of files (with full path) to compare to `target`.
@param {string} target - Full path of the reference file.
@returns {Boolean} `true` if `target` does not exist, or if at leat one input is newer than `target`.
Check if at least one file is newer than the target one .