diff --git a/doc/api/process.md b/doc/api/process.md index 8e5e495917160e..b9d910c371a37a 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1340,6 +1340,12 @@ The `process.getgroups()` method returns an array with the supplementary group IDs. POSIX leaves it unspecified if the effective group ID is included but Node.js ensures it always is. +```js +if (process.getgroups) { + console.log(process.getgroups()); // [ 16, 21, 297 ] +} +``` + This function is only available on POSIX platforms (i.e. not Windows or Android).