{"_id":"get-os-info","_rev":"1759710","name":"get-os-info","description":"This library allows you to get a correct OS name and version","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"artem-babich","email":"artem@babich.xyz"}],"time":{"modified":"2026-11-23T09:13:47.000Z","created":"2022-05-19T16:23:33.589Z","1.0.2":"2022-05-19T18:22:23.076Z","1.0.1":"2022-05-19T16:23:33.589Z"},"users":{},"author":{"name":"Artem-Babich"},"repository":{"type":"git","url":"git+https://github.com/Artem-Babich/get-os-info.git"},"versions":{"1.0.2":{"name":"get-os-info","version":"1.0.2","description":"This library allows you to get a correct OS name and version","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"publish-please":"publish-please","prepublishOnly":"publish-please guard"},"author":{"name":"Artem-Babich"},"homepage":"https://github.com/Artem-Babich/get-os-info#readme","repository":{"type":"git","url":"git+https://github.com/Artem-Babich/get-os-info.git"},"license":"ISC","dependencies":{"getos":"^3.2.1","macos-release":"^3.0.1","os-family":"^1.1.0","windows-release":"^5.0.1"},"devDependencies":{"@types/getos":"^3.0.1","@types/node":"^14.18.18","@typescript-eslint/eslint-plugin":"^5.25.0","@typescript-eslint/parser":"^5.25.0","chai":"^4.3.6","del":"^6.1.0","eslint":"^8.15.0","gulp":"^4.0.2","gulp-eslint":"^6.0.0","mocha":"^10.0.0","publish-please":"^5.5.2","typescript":"^4.8.0-dev.20220519"},"gitHead":"4716d5839ba0392025f6a85f8a2ef8396fc6afc1","bugs":{"url":"https://github.com/Artem-Babich/get-os-info/issues"},"_id":"get-os-info@1.0.2","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-Nlgt85ph6OHZ4XvTcC8LMLDDFUzf7LAinYJZUwzrnc3WiO+vDEHDmNItTtzixBDLv94bZsvJGrrDRAE6uPs4MQ==","shasum":"5f65df82d3fa16192d2363fc621f050f8a570864","tarball":"http://registry-npm.ywwl.com/get-os-info/download/get-os-info-1.0.2.tgz","fileCount":10,"unpackedSize":8977,"signatures":[{"keyid":"SHA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","size":2350,"noattachment":false,"key":"/get-os-info/-/get-os-info-1.0.2.tgz"},"_npmUser":{"name":"artem-babich","email":"artem@babich.xyz"},"directories":{},"maintainers":[{"name":"artem-babich","email":"artem@babich.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-os-info_1.0.2_1652984542907_0.05370350366710008"},"_hasShrinkwrap":false,"publish_time":1652984543076,"_cnpm_publish_time":1652984543076},"1.0.1":{"name":"get-os-info","version":"1.0.1","description":"This library allows you to get a correct OS name and version","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"publish-please":"publish-please","prepublishOnly":"publish-please guard"},"author":"","license":"ISC","dependencies":{"getos":"^3.2.1","macos-release":"^3.0.1","os-family":"^1.1.0","windows-release":"^5.0.1"},"devDependencies":{"@types/getos":"^3.0.1","@types/node":"^14.18.18","@typescript-eslint/eslint-plugin":"^5.25.0","@typescript-eslint/parser":"^5.25.0","chai":"^4.3.6","del":"^6.1.0","eslint":"^8.15.0","gulp":"^4.0.2","gulp-eslint":"^6.0.0","mocha":"^10.0.0","publish-please":"^5.5.2","typescript":"^4.8.0-dev.20220519"},"gitHead":"82dd6bdcd51ef522fe92375071a63987ef4dadec","_id":"get-os-info@1.0.1","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-6PcAllr7EO+brGjnUlfZF3KuNnHUFRIv1YRQw6zjcxM7kxha5CCHtJv0wRi3FEYXZBnahYt2/clCUmMU9Ll2zA==","shasum":"4a5c3bf579029fe1a43e91331e0e20cb1eae7ff0","tarball":"http://registry-npm.ywwl.com/get-os-info/download/get-os-info-1.0.1.tgz","fileCount":9,"unpackedSize":7084,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAvULYOpagveKeDAGNc3OV+PHq9exaVuUYjxbHsk+eeZAiBzYKKIRe7pKrnlLAJVpEhr5rENPmFSGgYGSiQtuZMhrA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihm8FACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpwtRAAn+l1nAn/oH/krbylLaWK/NB9/eo/4MtSC9W2UdrrUVh53iX7\r\ndgDt07OlcLMMWzo2Qi+BUxNBDpFnySVpjE9lWnp7ZImBpGKA2vZPNj+OjC5P\r\nKlKgmqogRPCilWMtwM75VR8Nc/6NXt/IIn5ynbrRPKtTpkA4EBXsg7+6wxUS\r\nOwVQhoUq852I5zpBy0aGwqYJjs9Ft0Twl9HpjTuxKLkFvjpKgUD0ukzUh9zV\r\ns7uaYAUOy1UgffmjLLFDcC2mE8it5e4zcy/IN3fplujbeX4TSK+iu44hEl/p\r\nVnDHZuNwOscw6wJAeOF1GPHPpmmzXzcIfJDSSmPzFidbga7diBbQvBYqj5Bw\r\n2/VMHjjz/azu78hmV5rQBbpZ5OS+vmA5TFm5iJqVEt/e7+ll1qFFImTAvEc+\r\nTHKAY0HQ7w64Ny1bApJ7NQa1x+wEC0GFKnYTtNM0sAdK1XvKrn5E6FcrV0Uo\r\n2+weEGfgg5w6rrRecJowFTKq1btZPy2r66cB3+Dhy97T9iPlOsSRJ6qAtNdH\r\nhgaRpqJZNP9Xufp2P7shHuTBWqO/tfTt3Ila6P9kG8d+TU9wFb0DOkQkL3cb\r\nuwQFWSn2dA2c6jeTLcAq7GT6g/VED1agLdmnfvPrg6LE/I37uJygQDvjECoV\r\nkR4X1qeRAR01dihcg2gGVWAt/JlDRvaUrYk=\r\n=jpbP\r\n-----END PGP SIGNATURE-----\r\n","size":1718,"noattachment":false,"key":"/get-os-info/-/get-os-info-1.0.1.tgz"},"_npmUser":{"name":"artem-babich","email":"artem@babich.xyz"},"directories":{},"maintainers":[{"name":"artem-babich","email":"artem@babich.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-os-info_1.0.1_1652977413382_0.17961094110087572"},"_hasShrinkwrap":false,"publish_time":1652977413589,"_cnpm_publish_time":1652977413589}},"readme":"# get-os-info\n\n> Get the name and version of the local OS\n\n> This package is based on the [macos-release](https://www.npmjs.com/package/macos-release)\n> , [windows-release](https://www.npmjs.com/package/windows-release) and [getos](https://www.npmjs.com/package/getos)\n> packages.\n\n## Install\n\n```\n$ npm install get-os-info\n```\n\n## Usage\n\n### TypeScript\n\n```ts\nimport getOSInfo, { OSInfo } from 'get-os-info'\n\nconst info: OSInfo | null = await getOSInfo();\n\nif (info)\n    console.log(info.name, info.version)\n\n// Example:\n// {\n//   name: 'Windows',\n//   version: '11'\n// }\n\n```\n\n### JavaScript\n\n```js\nimport { getOSInfo } from 'get-os-info';\n//or\nconst { getOSInfo } = require('get-os-info');\n\nconst info = await getOSInfo();\n```\n\n### Separate functions\n\n```js\nimport os from 'os'\nimport { getMacInfo, getWindowsInfo, getLinuxInfo } from \"get-os-info\";\n//or\nconst os = require(\"os\");\nconst { getMacInfo, getWindowsInfo, getLinuxInfo } = require('get-os-info')\n\nconst release = os.release(); //'10.0.22000'\n\ngetWindowsInfo(release).then(info => {\n    if (info)\n        console.log(info);\n})\n// {\n//   name:    'Windows',\n//   version: '11'\n// }\n\nconsole.log(await getWindowsInfo()) // Will be the same\n```\n\n> NOTE: Currently it is not possible to pass a release version argument to the getLinuxInfo function.\n\n## Related\n\n- [windows-release](https://github.com/sindresorhus/windows-release)\n- [macos-release](https://github.com/sindresorhus/macos-release)\n- [getos](https://github.com/retrohacker/getos)\n\n---\n","_attachments":{},"homepage":"https://github.com/Artem-Babich/get-os-info#readme","bugs":{"url":"https://github.com/Artem-Babich/get-os-info/issues"},"license":"ISC"}