index.d.ts 268 B

1234567891011121314151617
  1. /**
  2. Check if the process is running as root user, for example, one started with `sudo`.
  3. @example
  4. ```
  5. // index.js
  6. import isRoot = require('is-root');
  7. console.log(isRoot());
  8. // $ sudo node index.js
  9. // true
  10. ```
  11. */
  12. declare function isRoot(): boolean;
  13. export = isRoot;