diff --git a/index.js b/index.js index 7addc05..eafec76 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,8 @@ // original: https://github.com/CoderPuppy/os-browserify var { DeviceEventEmitter, - NativeModules + NativeModules, + Platform } = require('react-native'); var RNOS = NativeModules.RNOS; @@ -34,7 +35,7 @@ exports.totalmem = function () { exports.cpus = function () { return [] }; -exports.type = function () { return 'Browser' }; +exports.type = function () { return 'React Native' }; exports.release = function () { if (typeof navigator !== 'undefined') { @@ -51,10 +52,10 @@ exports.networkInterfaces exports.arch = function () { return 'javascript' }; -exports.platform = function () { return 'browser' }; +exports.platform = function () { return Platform.OS }; exports.tmpdir = exports.tmpDir = function () { return '/tmp'; }; -exports.EOL = '\n'; \ No newline at end of file +exports.EOL = '\n';