Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

which-os

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

which-os - npm Package Compare versions

Comparing version 0.0.2 to 1.3.0

CHANGELOG.md

13

index.js

@@ -1,6 +0,7 @@

'use strict';
var os = require('os');
module.exports = function() {
return os.type && os.type();
};
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./which-os"));
//# sourceMappingURL=index.js.map
{
"name": "which-os",
"version": "0.0.2",
"description": "check on what os node is running",
"main": "index.js",
"scripts": {
"test": "mocha"
"author": "Florian Keller <github@floriankeller.de>",
"bin": {
"is-linux": "cli.js --is-linux",
"is-macos": "cli.js --is-macos",
"is-windows": "cli.js --is-windows",
"which-os": "cli.js"
},
"dependencies": {
"commander": "5.0.0"
},
"description": "Get informations about your OS",
"devDependencies": {
"@ffflorian/prettier-config": "0.0.6",
"@ffflorian/semantic-release-config": "0.2.0",
"@ffflorian/tslint-config": "0.7.1",
"@semantic-release/changelog": "5.0.1",
"@semantic-release/git": "9.0.0",
"@types/jasmine": "3.5.10",
"@types/node": "~12",
"husky": "4.2.3",
"jasmine": "3.5.0",
"lint-staged": "10.1.2",
"prettier": "2.0.4",
"publish-flat": "1.4.0",
"rimraf": "3.0.2",
"semantic-release": "17.0.4",
"ts-node": "8.8.2",
"tslint": "6.1.1",
"tslint-config-prettier": "1.18.0",
"tslint-plugin-prettier": "2.3.0",
"typescript": "3.8.3"
},
"engines": {
"node": ">=0.10.0"
"node": ">= 10.9"
},
"repository": {
"type": "git",
"url": "https://github.com/skippednote/which-os.git"
},
"files": [
"index.js"
"cli.d.ts",
"cli.js",
"cli.js.map",
"index.d.ts",
"index.js",
"index.js.map",
"which-os.d.ts",
"which-os.js",
"which-os.js.map"
],
"keywords": [
"os"
"cli",
"operating system",
"os",
"typescript"
],
"author": "Bassam Ismail",
"license": "MIT",
"bugs": {
"url": "https://github.com/skippednote/which-os/issues"
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"homepage": "https://github.com/skippednote/which-os",
"devDependencies": {
"mocha": "~1.17.0"
}
"license": "GPL-3.0",
"lint-staged": {
"*.{json,md,yml}": [
"prettier --write",
"git add"
],
"spec/**/*.ts": [
"tslint --project tsconfig.jasmine.json --fix"
],
"src/**/*.ts": [
"tslint --project tsconfig.json --fix"
]
},
"main": "index.js",
"name": "which-os",
"prettier": "@ffflorian/prettier-config",
"repository": "https://github.com/ffflorian/which-os.git",
"release": {
"extends": "@ffflorian/semantic-release-config"
},
"scripts": {
"build": "tsc",
"clean": "rimraf dist",
"dist": "yarn clean && yarn build",
"fix": "yarn fix:other && yarn fix:ts",
"fix:other": "yarn prettier --write",
"fix:ts": "yarn lint:ts --fix && yarn lint:ts:spec --fix",
"flatten": "publish-flat -o flattened",
"lint": "yarn lint:ts && yarn lint:ts:spec && yarn lint:other",
"lint:other": "yarn prettier --list-different",
"lint:ts": "tslint --project tsconfig.json",
"lint:ts:spec": "tslint --project tsconfig.jasmine.json",
"postversion": "node ../node_modules/publish-flat/cli-copy.js -i package.json -o ../package.json version",
"prettier": "prettier \"*.{json,md,yml}\"",
"release": "semantic-release",
"start": "ts-node src/cli.ts",
"test": "ts-node -P tsconfig.jasmine.json node_modules/.bin/jasmine"
},
"version": "1.3.0"
}

@@ -1,11 +0,29 @@

# which-os [![Build Status](https://travis-ci.org/skippednote/which-os.png?branch=master)](https://travis-ci.org/skippednote/which-os)
> Tell me the OS
# which-os [![Build Status](https://github.com/ffflorian/which-os/workflows/Build/badge.svg)](https://github.com/ffflorian/which-os/actions/) [![npm version](https://img.shields.io/npm/v/which-os.svg?style=flat)](https://www.npmjs.com/package/which-os) [![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=ffflorian/which-os)](https://dependabot.com)
### Example
$ sudo node index.js
Get informations about your OS
// require which-os
var whichOs = require('which-os');
## Usage
whichOs();
//=> Linux/Window_NT/OSX
Just run `npx which-os`.
```
Usage: which-os [options]
Get informations about your OS
Options:
--is-linux Is the operating system Linux?
--is-macos Is the operating system macOS?
--is-windows Is the operating system Windows?
--is-x64 Is the processor architecture x64?
--is-ia32 Is the processor architecture ia32?
--is-arm Is the processor architecture ARM?
-i, --os-info Output all OS informations
-V, --verbose Enable verbose output
-v, --version output the version number
-h, --help output usage information
```
## TypeScript Usage
See [`./src/cli.ts`](./src/cli.ts)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc