{ "manifest": { "name": "getos", "version": "3.2.1", "description": "Get the OS/Distribution name of the environment you are working on", "main": "index.js", "scripts": { "test": "node tests/mocktests.js", "posttest": "standard", "integration": "node tests/runTest.js", "standard-fix": "standard --fix" }, "repository": { "type": "git", "url": "https://github.com/retrohacker/getos.git" }, "keywords": [ "OS", "Distribution", "Platform", "Version" ], "author": { "name": "william.jblankenship@gmail.com" }, "license": "MIT", "bugs": { "url": "https://github.com/retrohacker/getos/issues" }, "homepage": "https://github.com/retrohacker/getos", "devDependencies": { "cli-color": "^2.0.0", "execSync": "^1.0.2", "standard": "^14.3.1", "tape": "^4.13.2" }, "dependencies": { "async": "^3.2.0" }, "contributors": [ { "name": "Benjamin E. Coe", "email": "bencoe@gmail.com", "url": "https://github.com/bcoe" } ], "_registry": "npm", "_loc": "/home/josie/.cache/yarn/v6/npm-getos-3.2.1-integrity/node_modules/getos/package.json", "readmeFilename": "README.md", "readme": "# getos\n\n[](https://greenkeeper.io/)\n\n\n\n[](https://travis-ci.org/retrohacker/getos)     \n\n[](https://nodei.co/npm/getos/)[](https://nodei.co/npm/getos/)\n\n[](https://github.com/feross/standard)\n\n\nGet the OS/Distribution name of the environment you are working on\n\n## Problem\n\n`os.platform()` returns `linux`. If you want the distrubtion name, you're out of luck.\n\n## Solution\n\nThis. Simply call:\n\n```js\nvar getos = require('getos')\n\ngetos(function(e,os) {\n if(e) return console.log(e)\n console.log(\"Your OS is:\" +JSON.stringify(os))\n})\n```\n\nThe `os` object conforms to:\n\n```js\n{\n os: [OS NAME],\n dist:[DIST NAME],\n codename:[CODENAME],\n release:[VERSION]\n}\n```\n\nFor example:\n\n```js\n{\n os: \"linux\",\n dist: \"Ubuntu\",\n codename: \"precise\",\n release: \"12.04\"\n}\n```\n\n## Disclaimer\nCheck `os.json` in this repo. Any distribution that *shares* a common resource file with another distrubtion is currently untested. These are the arrays of distrubitons with more than 1 member. If you are using one of these distrubtions, please submit an issue letting me know if it works. If it fails, please post the content of the file.\n\nIf you have a distrubtion *not* in `os.json`, please identify your resource file and submit it's name and content along with your distrbution/version in an issue.\n\nThanks for helping make this tool great.\n\n## Unit Tests\n\nUnit tests stub out the behaviour of the OS files and libraries we depend on to ensure the behaviour of the application is sound. You can run these simply by running `npm test`\n\n## Authors and Contributors\n\ngetos has been made possible by these fantastic contributors:\n\n
| Benjamin E. Coe | GitHub/bcoe | Twitter/@benjamincoe |
|---|---|---|
| Eugene Sharygin | GitHub/eush77 | Twitter/@eush77 |
| David Routhieau | GitHub/root-io | unknown |
| Lawrence | GitHub/mindmelting | Twitter/@mindmelting |
| Roman Jurkov | GitHub/winfinit | Twitter/@winfinit |
| Rod Vagg | GitHub/rvagg | Twitter/@rvagg |
| Zeke Sikelianos | GitHub/zeke | Twitter/@zeke |
| Alexander | GitHub/alex4Zero | Twitter/@alex4Zero |