|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
268 bytes
|
| Line | |
|---|
| 1 | /**
|
|---|
| 2 | Check if the process is running as root user, for example, one started with `sudo`.
|
|---|
| 3 |
|
|---|
| 4 | @example
|
|---|
| 5 | ```
|
|---|
| 6 | // index.js
|
|---|
| 7 | import isRoot = require('is-root');
|
|---|
| 8 |
|
|---|
| 9 | console.log(isRoot());
|
|---|
| 10 |
|
|---|
| 11 | // $ sudo node index.js
|
|---|
| 12 | // true
|
|---|
| 13 | ```
|
|---|
| 14 | */
|
|---|
| 15 | declare function isRoot(): boolean;
|
|---|
| 16 |
|
|---|
| 17 | export = isRoot;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.