Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

3 anni fa
1234567891011121314151617181920212223242526272829303132333435
  1. # is-root [![Build Status](https://travis-ci.org/sindresorhus/is-root.svg?branch=master)](https://travis-ci.org/sindresorhus/is-root)
  2. > Check if the process is running as root user, for example, one started with `sudo`
  3. ## Install
  4. ```
  5. $ npm install is-root
  6. ```
  7. ## Usage
  8. ```
  9. $ sudo node index.js
  10. ```
  11. ```js
  12. // index.js
  13. const isRoot = require('is-root');
  14. isRoot();
  15. //=> true
  16. ```
  17. ## Related
  18. - [is-elevated](https://github.com/sindresorhus/is-elevated) - Check if the process is running with elevated privileges *(cross-platform)*
  19. ## License
  20. MIT © [Sindre Sorhus](https://sindresorhus.com)