Add OS module

This commit is contained in:
Daniel Gasienica 2018-02-26 11:26:23 -05:00
parent dbc242c37f
commit 91daedd619
2 changed files with 11 additions and 0 deletions

10
js/modules/os.js Normal file
View file

@ -0,0 +1,10 @@
/* eslint-env node */
exports.isMacOS = () =>
process.platform === 'darwin';
exports.isLinux = () =>
process.platform === 'linux';
exports.isWindows = () =>
process.platform === 'win32';

View file

@ -101,6 +101,7 @@
// ES2015+ modules
window.Signal = window.Signal || {};
window.Signal.OS = require('./js/modules/os');
window.Signal.Types = window.Signal.Types || {};
window.Signal.Types.Attachment = require('./js/modules/types/attachment');
window.Signal.Types.Message = require('./js/modules/types/message');