craydent-date
Version:
Node module to extend fs/file system functionality and simplify code for maintainability and readability
15 lines (14 loc) • 495 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = __isNewer;
function __isNewer(loadedVersion, thisVersion) {
if (loadedVersion[0] == thisVersion[0]) {
loadedVersion.splice(0, 1);
thisVersion.splice(0, 1);
if (!thisVersion.length || !loadedVersion.length) {
return false;
}
return __isNewer(loadedVersion, thisVersion);
}
return parseInt(loadedVersion[0]) < parseInt(thisVersion[0]);
}