Fix typos

This commit is contained in:
Marcello 2021-09-20 19:35:32 +02:00
parent 76550dfa3c
commit 5c0799df7f
118 changed files with 1150 additions and 1602 deletions

View file

@ -14,12 +14,12 @@ class CustomEmitter extends EventEmitter {} ;
const customEmitterObj = new CustomEmitter();
// add event listener
cusomEmitterObj.on("event", (e) => {
customEmitterObj.on("event", (e) => {
// e contains event object
})
// single-use event listener (execute and remove listener)
cusomEmitterObj.once("event", (e) => {
customEmitterObj.once("event", (e) => {
// e contains event object
})

View file

@ -1,6 +1,6 @@
# fs (FIle System) Module
Async versions can acces file at the same time which can lead to conflicts in operations, erros can be handled in callback.
Async versions can access file at the same time which can lead to conflicts in operations, errors can be handled in callback.
Sync versions cannot interfere with each other, errors cause exceptions, handle in try-catch.
## Files
@ -71,7 +71,7 @@ fs.rmdirSync(path, recursive=false;
### Reading Directory Contents
```js
// read directrory contents
// read directory contents
fs.readdir(path, (err, files) => {}); // files is string[]
fs.readdir(path, { withFileTypes: true }, (err, files) => {}); // files is Dirent[]
fs.readdirSync(path); // returns string[] of files/directories

View file

@ -1,6 +1,6 @@
# HTTP(S) Module
## HTTTP(S) IncomingMessage (request)
## HTTPS(S) IncomingMessage (request)
### Making a request
@ -17,7 +17,7 @@ https.request(
).end();
```
### Reqest Methods & Properties
### Request Methods & Properties
```js
IncomingMessage.headers
@ -26,7 +26,7 @@ IncomingMessage.statusMessage
IncomingMessage.url
```
## HTTTP(S) ServerResponse (response)
## HTTPS(S) ServerResponse (response)
### Response Methods & Properties

View file

@ -16,5 +16,5 @@ os.homedir(); // CUrrent user home directory
os.hostname(); // PC Name
os.cpus(); // Array of CPU info
os.networkInterfaces(); // Array of Network Interfacecs info
os.networkInterfaces(); // Array of Network Interfaces info
```

View file

@ -15,7 +15,7 @@ process.arch // processor architecture
## Functions
```js
process.resourecUsage(); // resource usage for the current process
process.resourceUsage(); // resource usage for the current process
process.memoryUsage(); // memory usage of the Node.js process measured in bytes
process.exit(code); // terminate the process synchronously with an exit status of code
```