feat(std/node): add os.loadavg() (#4075)

This commit is contained in:
ecyrbe 2020-02-23 00:46:52 +01:00 committed by GitHub
parent c34d96d865
commit fb98556d56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 58 additions and 26 deletions

View file

@ -40,6 +40,12 @@ declare namespace Deno {
stderr: boolean;
};
/** Get the loadavg. Requires the `--allow-env` flag.
*
* console.log(Deno.loadavg());
*/
export function loadavg(): number[];
/** Get the hostname. Requires the `--allow-env` flag.
*
* console.log(Deno.hostname());