From 0a334fda6369fdbcff46093952ee78323e91f73a Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 25 Aug 2020 10:50:11 +0200 Subject: [PATCH] updated docs --- CHANGELOG.md | 2 +- docs/gettingstarted.html | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d24f4a..69ed618 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,7 +58,7 @@ For major (breaking) changes - version 3 and 2 see end of page. | 4.23.6 | 2020-04-25 | `networkGatewayDefault()` bug fix no interfaces | | 4.23.5 | 2020-04-20 | updated docs | | 4.23.4 | 2020-04-20 | `users()` optimized parseDateTime function | -| 4.23.3 | 2020-04-09 | recactored to avoid `cat` | +| 4.23.3 | 2020-04-09 | refactored to avoid `cat` | | 4.23.2 | 2020-04-08 | `cpu()` fixed getting base frequency for AMD Ryzen | | 4.23.1 | 2020-03-11 | `diskLayout()` optimized detection linux | | 4.23.0 | 2020-03-08 | `versions()` added param to specify which program/lib versions to detect | diff --git a/docs/gettingstarted.html b/docs/gettingstarted.html index 21c9b64..1701046 100644 --- a/docs/gettingstarted.html +++ b/docs/gettingstarted.html @@ -92,10 +92,11 @@ si.cpu(function(data) { console.log('...'); })

Promise Style

-

Promises style is new since version 3.0.

+

Promises style is new since version 3.0. +

-

When omitting callback parameter (cb), then you can use all function in a promise oriented way. All functions (exept of version and time) are returning a promise, that you can consume:

-
const si = require('systeminformation');
+              

When omitting callback parameter (cb), then you can use all function in a promise oriented way. All functions (exept of version and time) are returning a promise, that you can consume:

+
const si = require('systeminformation');
 
 si.cpu()
     .then(data => {
@@ -108,9 +109,9 @@ si.cpu()
         console.log('...');
     })
     .catch(error => console.error(error));

-

Async/Await Style

-

Since node v7.6 you can also use the async / await pattern. The above example would then look like this:

-
const si = require('systeminformation');
+              

Async/Await Style

+

Since node v7.6 you can also use the async / await pattern. The above example would then look like this:

+
const si = require('systeminformation');
 
 async function cpuData() {
     try {
@@ -126,8 +127,8 @@ async function cpuData() {
         console.log(e)
     }
 }

-

Issues

-

If you discover some empty or incorrect values, please be sure to first have a look at the Known issues section.

+

Issues

+

If you discover some empty or incorrect values, please be sure to first have a look at the Known issues section.