Refactor notification to simplify event handling

This commit is contained in:
Yuya Ochiai
2016-06-16 22:10:55 +09:00
parent 73a11ea398
commit 722807a5cb
3 changed files with 40 additions and 45 deletions

View File

@@ -3,5 +3,12 @@ var release_split = os.release().split('.');
module.exports = {
major: parseInt(release_split[0]),
minor: parseInt(release_split[1])
minor: parseInt(release_split[1]),
isLowerThanOrEqualWindows8_1: function() {
if (process.platform != 'win32') {
return false;
}
// consider Windows 7 and later.
return (this.major <= 6 && this.minor <= 3);
}
};