Big News: Socket Selected for OpenAI's Cybersecurity Grant Program.Details
Socket
Book a DemoSign in
Socket

is-root

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-root

Check if the process is running as root user, for example, one started with `sudo`

latest
Source
npmnpm
Version
3.0.0
Version published
Weekly downloads
5.3M
2.34%
Maintainers
1
Weekly downloads
 
Created
Source

is-root

Check if the process is running as root user, for example, one started with sudo

Install

$ npm install is-root

Usage

$ sudo node index.js
// index.js
import isRoot from 'is-root';

isRoot();
//=> true
  • is-elevated - Check if the process is running with elevated privileges (cross-platform)

Keywords

sudo

FAQs

Package last updated on 07 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts