index.js 497 B

1234567891011121314151617
  1. var detect;
  2. var os = require('os');
  3. if (os.platform() == 'win32') {
  4. if (os.release().indexOf('10.') == 0)
  5. detect = require('./src/detect-windows10');
  6. else
  7. detect = require('./src/detect-windows');
  8. } else if (os.platform() == 'darwin') {
  9. detect = require('./src/detect-mac');
  10. } else if (os.platform() == 'linux' || os.platform() == 'freebsd') {
  11. detect = require('./src/detect-linux');
  12. } else {
  13. detect = require('./src/detect-stub');
  14. }
  15. module.exports = detect;