lib/modes.js
function _isSmallerAfterCompression(rawFile, compressedFile, opts) {
    return compressedFile.remove()
        .then(function () {
            var tolerance = opts.tolerance < 1
                ? opts.tolerance * rawFile.size
                : opts.tolerance;

            return rawFile.size > compressedFile.size + tolerance;
        });
}
function _isSmallerAfterCompression(rawFile, compressedFile, opts) {
    return compressedFile.remove()
        .then(function () {
            var tolerance = opts.tolerance < 1
                ? opts.tolerance * rawFile.size
                : opts.tolerance;

            return rawFile.size > compressedFile.size + tolerance;
        });
}
function _isSmallerAfterCompression ( rawFile , compressedFile , opts ) { return compressedFile . remove ( ) . then ( function ( ) { var tolerance = opts . tolerance < 1 ? opts . tolerance * rawFile . size : opts . tolerance ; return rawFile . size > compressedFile . size + tolerance ; } ) ; }
Checks whether the given raw file is smaller than the given compressed file
Removes the compressed file
@param {File} rawFile
@param {File} compressedFile
@param {Object}   [opts] -> lib/defaults.js
@param {Number}   [opts.tolerance=0]
@param {String[]} [opts.reporters=[]]
@param {String}   [opts._tmpDir=md5]
@returns {Promise * Boolean}
Checks whether the given raw file is smaller than the given compressed file Removes the compressed file