Skip to content

Commit cfad20c

Browse files
chore(content): updated content fixing a few issues (nodejs#2913)
Co-authored-by: Manish Kumar ⛄ <[email protected]>
1 parent f293b1d commit cfad20c

18 files changed

+58
-139
lines changed

content/get-involved/index.en.md

+1-11
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ category: get-involved
77

88
## Community Discussion
99

10-
* The [GitHub issues list](https://github.com/nodejs/node/issues) is the place for discussion of Node.js core features.
10+
* The [GitHub Issues list](https://github.com/nodejs/node/issues) is the place for discussion of Node.js core features.
1111
* For real-time chat about Node.js development use one of the platforms below
1212
* For IRC, go to `irc.libera.chat` in the `#node.js` channel with an [IRC client](https://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients) or connect in your web browser to the channel using [a web client](https://kiwiirc.com/nextclient/)
1313
* For Slack, there are two options:
@@ -24,13 +24,3 @@ category: get-involved
2424
* [Stack Overflow Node.js tag](https://stackoverflow.com/questions/tagged/node.js) collects new information every day.
2525
* [The DEV Community Node.js tag](https://dev.to/t/node) is a place to share Node.js projects, articles and tutorials as well as start discussions and ask for feedback on Node.js-related topics. Developers of all skill-levels are welcome to take part.
2626
* [Nodeiflux](https://discordapp.com/invite/vUsrbjd) is a friendly community of Node.js backend developers supporting each other on Discord.
27-
28-
## International community sites and projects
29-
30-
* [Chinese community](https://cnodejs.org/)
31-
* [Hungarian (Magyar) community](https://nodehun.blogspot.com/)
32-
* [Israeli Facebook group for Node.js](https://www.facebook.com/groups/node.il/)
33-
* [Japanese user group](https://nodejs.jp/)
34-
* [Spanish language Facebook group for Node.js](https://www.facebook.com/groups/node.es/)
35-
* [Vietnamese Node.js community](https://www.facebook.com/nodejs.vn/)
36-
* [Uzbekistan group for Node.js](https://t.me/nodejs_uz)

content/get-involved/index.fr.md

-10
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,3 @@ category: get-involved
2424
* [Stack Overflow Node.js tag](https://stackoverflow.com/questions/tagged/node.js) recueille chaque jour de nouvelles informations.
2525
* [The DEV Community Node.js tag](https://dev.to/t/node) est un endroit pour partager des projets, des articles et des tutoriels Node.js, ainsi que pour lancer des discussions et demander des commentaires sur des sujets liés à Node.js. Les développeurs de tous niveaux de compétence sont les bienvenus.
2626
* [Nodeiflux](https://discordapp.com/invite/vUsrbjd) est une communauté amicale de développeurs backend Node.js qui se soutiennent mutuellement sur Discord.
27-
28-
## Sites et projets communautaires internationaux
29-
30-
* [Chinese community](https://cnodejs.org/)
31-
* [Hungarian (Magyar) community](https://nodehun.blogspot.com/)
32-
* [Israeli Facebook group for Node.js](https://www.facebook.com/groups/node.il/)
33-
* [Japanese user group](https://nodejs.jp/)
34-
* [Spanish language Facebook group for Node.js](https://www.facebook.com/groups/node.es/)
35-
* [Vietnamese Node.js community](https://www.facebook.com/nodejs.vn/)
36-
* [Uzbekistan group for Node.js](https://t.me/nodejs_uz)

content/learn/asynchronous-work/blocking-vs-non-blocking.en.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: overview-of-blocking-vs-non-blocking
33
displayTitle: 'Overview of Blocking vs Non-Blocking'
4+
authors: ovflowd
45
category: learn
56
---
67

content/learn/asynchronous-work/javascript-callbacks.en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: javascript-asynchronous-programming-and-callbacks
33
displayTitle: 'JavaScript Asynchronous Programming and Callbacks'
44
description: 'JavaScript is synchronous by default, and is single threaded. This means that code cannot create new threads and run in parallel. Find out what asynchronous code means and how it looks like'
5-
authors: flaviocopes, MylesBorins, LaRuaNa, amiller-gh, ahmadawais
5+
authors: flaviocopes, MylesBorins, LaRuaNa, amiller-gh, ahmadawais, ovflowd
66
category: learn
77
---
88

content/learn/asynchronous-work/javascript-timers/index.en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: discover-javascript-timers
33
displayTitle: 'Discover JavaScript Timers'
44
description: 'When writing JavaScript code, you might want to delay the execution of a function. Learn how to use setTimeout and setInterval to schedule functions in the future'
5-
authors: flaviocopes, MylesBorins, LaRuaNa, amiller-gh, ahmadawais
5+
authors: flaviocopes, MylesBorins, LaRuaNa, amiller-gh, ahmadawais, ovflowd
66
category: learn
77
---
88

content/learn/asynchronous-work/node-control-flow.en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: asynchronous-flow-control
33
displayTitle: 'Asynchronous flow control'
44
description: 'JavaScript control flow is all about callback handling. Here are strategies to help your development.'
5-
authors: aug2uag
5+
authors: aug2uag, ovflowd
66
category: learn
77
---
88

content/learn/asynchronous-work/node-event-emitter.en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: the-nodejs-event-emitter
33
displayTitle: 'The Node.js Event emitter'
44
description: 'How to work with custom events in Node.js'
5-
authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais
5+
authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais, ovflowd
66
category: learn
77
---
88

content/learn/asynchronous-work/node-process-nexttick.en.md

+3-7
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
title: understanding-processnexttick
33
displayTitle: 'Understanding process.nextTick()'
44
description: 'The Node.js process.nextTick function interacts with the event loop in a special way'
5-
authors: flaviocopes, MylesBorins, LaRuaNa, ahmadawais
5+
authors: flaviocopes, MylesBorins, LaRuaNa, ahmadawais, ovflowd
66
category: learn
77
---
88

9-
As you try to understand the Node.js event loop, one important part of it is `process.nextTick()`.
10-
11-
Every time the event loop takes a full trip, we call it a tick.
9+
As you try to understand the Node.js event loop, one important part of it is `process.nextTick()`. Every time the event loop takes a full trip, we call it a tick.
1210

1311
When we pass a function to `process.nextTick()`, we instruct the engine to invoke this function at the end of the current operation, before the next event loop tick starts:
1412

@@ -18,9 +16,7 @@ process.nextTick(() => {
1816
});
1917
```
2018

21-
The event loop is busy processing the current function code.
22-
23-
When this operation ends, the JS engine runs all the functions passed to `nextTick` calls during that operation.
19+
The event loop is busy processing the current function code. When this operation ends, the JS engine runs all the functions passed to `nextTick` calls during that operation.
2420

2521
It's the way we can tell the JS engine to process a function asynchronously (after the current function), but as soon as possible, not queue it.
2622

content/learn/asynchronous-work/node-setimmediate.en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: understanding-setimmediate
33
displayTitle: 'Understanding setImmediate()'
44
description: 'The Node.js setImmediate function interacts with the event loop in a special way'
5-
authors: flaviocopes, MylesBorins, LaRuaNa, ahmadawais, clean99
5+
authors: flaviocopes, MylesBorins, LaRuaNa, ahmadawais, clean99, ovflowd
66
category: learn
77
---
88

content/learn/getting-started/node-difference-browser.en.md

+3-11
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,21 @@ authors: flaviocopes, ollelauribostrom, MylesBorins, fhemberger, LaRuaNa, ahmada
66
category: learn
77
---
88

9-
Both the browser and Node.js use JavaScript as their programming language.
10-
11-
Building apps that run in the browser is a completely different thing than building a Node.js application.
12-
13-
Despite the fact that it's always JavaScript, there are some key differences that make the experience radically different.
9+
Both the browser and Node.js use JavaScript as their programming language. Building apps that run in the browser is a completely different thing than building a Node.js application. Despite the fact that it's always JavaScript, there are some key differences that make the experience radically different.
1410

1511
From the perspective of a frontend developer who extensively uses JavaScript, Node.js apps bring with them a huge advantage: the comfort of programming everything - the frontend and the backend - in a single language.
1612

1713
You have a huge opportunity because we know how hard it is to fully, deeply learn a programming language, and by using the same language to perform all your work on the web - both on the client and on the server, you're in a unique position of advantage.
1814

19-
What changes is the ecosystem.
15+
> **What changes is the ecosystem.**
2016
2117
In the browser, most of the time what you are doing is interacting with the DOM, or other Web Platform APIs like Cookies. Those do not exist in Node.js, of course. You don't have the `document`, `window` and all the other objects that are provided by the browser.
2218

2319
And in the browser, we don't have all the nice APIs that Node.js provides through its modules, like the filesystem access functionality.
2420

2521
Another big difference is that in Node.js you control the environment. Unless you are building an open source application that anyone can deploy anywhere, you know which version of Node.js you will run the application on. Compared to the browser environment, where you don't get the luxury to choose what browser your visitors will use, this is very convenient.
2622

27-
This means that you can write all the modern ES2015+ JavaScript that your Node.js version supports.
28-
29-
Since JavaScript moves so fast, but browsers can be a bit slow to upgrade, sometimes on the web you are stuck with using older JavaScript / ECMAScript releases.
30-
31-
You can use Babel to transform your code to be ES5-compatible before shipping it to the browser, but in Node.js, you won't need that.
23+
This means that you can write all the modern ES2015+ JavaScript that your Node.js version supports. Since JavaScript moves so fast, but browsers can be a bit slow to upgrade, sometimes on the web you are stuck with using older JavaScript / ECMAScript releases. You can use Babel to transform your code to be ES5-compatible before shipping it to the browser, but in Node.js, you won't need that.
3224

3325
Another difference is that Node.js supports both the CommonJS and ES module systems (since Node.js v12), while in the browser we are starting to see the ES Modules standard being implemented.
3426

content/learn/getting-started/node-es6.en.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: ecmascript-2015-es6-and-beyond
33
displayTitle: 'ECMAScript 2015 (ES6) and beyond'
4+
authors: ovflowd
45
category: learn
56
---
67

content/learn/getting-started/node-installation.en.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22
title: how-to-install-nodejs
33
displayTitle: 'How to install Node.js'
44
description: 'How you can install Node.js on your system: a package manager, the official website installer or nvm'
5-
authors: flaviocopes, ZYSzys, ollelauribostrom, MylesBorins, fhemberger, LaRuaNa, ahmadawais, benhalverson
5+
authors: flaviocopes, ZYSzys, ollelauribostrom, MylesBorins, fhemberger, LaRuaNa, ahmadawais, benhalverson, ovflowd
66
category: learn
77
---
88

99
Node.js can be installed in different ways. This post highlights the most common and convenient ones. Official packages for all the major platforms are available at [https://nodejs.dev/download/](/download/).
1010

1111
One very convenient way to install Node.js is through a package manager. In this case, every operating system has its own. Other package managers for MacOS, Linux, and Windows are listed in [https://nodejs.dev/download/package-manager/](/download/package-manager/)
1212

13-
`nvm` is a popular way to run Node.js. It allows you to easily switch the Node.js version, and install new versions to try and easily rollback if something breaks.
14-
15-
It is also very useful to test your code with old Node.js versions.
13+
`nvm` is a popular way to run Node.js. It allows you to easily switch the Node.js version, and install new versions to try and easily rollback if something breaks. It is also very useful to test your code with old Node.js versions.
1614

1715
> See [https://github.com/nvm-sh/nvm](https://github.com/nvm-sh/nvm) for more information about this option.
1816

content/learn/getting-started/node-javascript-language.en.md

+19-20
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,34 @@
22
title: how-much-javascript-do-you-need-to-know-to-use-nodejs
33
displayTitle: 'How much JavaScript do you need to know to use Node.js?'
44
description: 'If you are just starting out with JavaScript, how deeply do you need to know the language?'
5-
authors: flaviocopes, ollelauribostrom, MylesBorins, fhemberger, LaRuaNa, ahmadawais, elanandkumar
5+
authors: flaviocopes, ollelauribostrom, MylesBorins, fhemberger, LaRuaNa, ahmadawais, elanandkumar, ovflowd
66
category: learn
77
---
88

9-
As a beginner, it's hard to get to a point where you are confident enough in your programming abilities.
9+
As a beginner, it's hard to get to a point where you are confident enough in your programming abilities. While learning to code, you might also be confused at where does JavaScript end, and where Node.js begins, and vice versa.
1010

11-
While learning to code, you might also be confused at where does JavaScript end, and where Node.js begins, and vice versa.
11+
### What is recommended to learn before diving deep with Node.js?
1212

13-
**I would recommend you to have a good grasp of the main JavaScript concepts before diving into Node.js:**
14-
15-
* Lexical Structure
16-
* Expressions
17-
* Types
18-
* Classes
13+
* [Lexical Structure](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar)
14+
* [Expressions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators)
15+
* [Data Types](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures)
16+
* [Classes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes)
1917
* Variables
20-
* Functions
21-
* this
22-
* Arrow Functions
23-
* Loops
24-
* Scopes
25-
* Arrays
26-
* Template Literals
27-
* Semicolons
28-
* Strict Mode
29-
* ECMAScript 2015 and beyond
18+
* [Functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions)
19+
* [`this` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this)
20+
* [Arrow Functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions)
21+
* [Loops](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration)
22+
* [Scopes](https://developer.mozilla.org/en-US/docs/Glossary/Scope)
23+
* [Arrays](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)
24+
* [Template Literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
25+
* [Strict Mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode)
26+
* [ECMAScript 2015 (ES6) and beyond](/learn/ecmascript-2015-es6-and-beyond/)
3027

3128
With those concepts in mind, you are well on your road to become a proficient JavaScript developer, in both the browser and in Node.js.
3229

33-
**The following concepts are also key to understand asynchronous programming, which is one of the fundamental parts of Node.js:**
30+
#### Asynchronous Programming
31+
32+
The following concepts are also key to understand asynchronous programming, which is one of the fundamental parts of Node.js:
3433

3534
* [Asynchronous programming and callbacks](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Asynchronous/Introducing)
3635
* [Timers](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout)

content/learn/getting-started/node-with-typescript.en.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: nodejs-with-typescript
33
displayTitle: 'Node.js with TypeScript'
44
description: 'Find out why TypeScript is an awesome tool and learn to use it by yourself.'
5-
authors: sbielenica
5+
authors: sbielenica, ovflowd
66
category: learn
77
---
88

@@ -14,7 +14,7 @@ Basically, it's a superset of JavaScript that adds new capabilities to the langu
1414

1515
We can talk about other TypeScript benefits later, let's see some examples now!
1616

17-
## Examples
17+
### Examples
1818

1919
Take a look at this code snippet and then we can unpack it together:
2020

@@ -42,15 +42,15 @@ There are additional things about this example that you should know. Firstly, if
4242

4343
Okay, so we have some TypeScript code. Now how do we run it?
4444

45-
First thing to do is to install TypeScript in our project:
45+
**First thing to do is to install TypeScript in our project:**
4646

4747
```bash
4848
npm i -D typescript
4949
```
5050

5151
Now we can compile it to JavaScript using `tsc` command in the terminal. Let's do it!
5252

53-
Assuming that our file is named `example.ts`, the command would look like:
53+
**Assuming that our file is named `example.ts`, the command would look like:**
5454

5555
```bash
5656
npx tsc example.ts
@@ -59,7 +59,7 @@ npx tsc example.ts
5959
This command will result in a new file named `example.js` that we can run using Node.js.
6060
Now when we know how to compile and run TypeScript code let's see TypeScript bug-preventing capabilities in action!
6161

62-
This is how we will modify our code:
62+
**This is how we will modify our code:**
6363

6464
```ts
6565
type User = {
@@ -79,7 +79,7 @@ const justine: User = {
7979
const isJustineAnAdult: string = isAdult(justine, "I shouldn't be here!");
8080
```
8181

82-
And this is what TypeScript has to say about this:
82+
**And this is what TypeScript has to say about this:**
8383

8484
```console
8585
example.ts:12:3 - error TS2322: Type 'string' is not assignable to type 'number'.

content/learn/getting-started/node-with-web-assembly.en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: nodejs-with-webassembly
33
displayTitle: 'Node.js with WebAssembly'
44
description: 'Find out why WebAssembly is an awesome tool and learn to use it by yourself.'
5-
authors: lancemccluskey
5+
authors: lancemccluskey, ovflowd
66
category: learn
77
---
88

content/learn/manipulating-files/node-file-stats.en.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
title: nodejs-file-stats
33
displayTitle: 'Node.js file stats'
44
description: 'How to get the details of a file using Node.js'
5-
authors: flaviocopes, ZYSzys, MylesBorins, fhemberger, LaRuaNa, ahmadawais, clean99
5+
authors: flaviocopes, ZYSzys, MylesBorins, fhemberger, LaRuaNa, ahmadawais, clean99, ovflowd
66
category: learn
77
---
88

9-
Every file comes with a set of details that we can inspect using Node.js.
10-
11-
In particular, using the `stat()` method provided by the `fs` module.
9+
Every file comes with a set of details that we can inspect using Node.js. In particular, using the `stat()` method provided by the `fs` module.
1210

1311
You call it passing a file path, and once Node.js gets the file details it will call the callback function you pass, with 2 parameters: an error message, and the file stats:
1412

content/learn/manipulating-files/node-folders.en.md

-50
Original file line numberDiff line numberDiff line change
@@ -139,53 +139,3 @@ fs.rm(dir, { recursive: true, force: true }, err => {
139139
console.log(`${dir} is deleted!`);
140140
});
141141
```
142-
143-
Or you can install and make use of the [`fs-extra`](https://www.npmjs.com/package/fs-extra) module, which is very popular and well maintained. It's a drop-in replacement of the `fs` module, which provides more features on top of it.
144-
145-
In this case the `remove()` method is what you want.
146-
147-
Install it using
148-
149-
```bash
150-
npm install fs-extra
151-
```
152-
153-
and use it like this:
154-
155-
```js
156-
const fs = require('fs-extra');
157-
158-
const folder = '/Users/joe';
159-
160-
fs.remove(folder, err => {
161-
console.error(err);
162-
});
163-
```
164-
165-
It can also be used with promises:
166-
167-
```js
168-
fs.remove(folder)
169-
.then(() => {
170-
// done
171-
})
172-
.catch(err => {
173-
console.error(err);
174-
});
175-
```
176-
177-
or with async/await:
178-
179-
```js
180-
async function removeFolder(folder) {
181-
try {
182-
await fs.remove(folder);
183-
// done
184-
} catch (err) {
185-
console.error(err);
186-
}
187-
}
188-
189-
const folder = '/Users/joe';
190-
removeFolder(folder);
191-
```

0 commit comments

Comments
 (0)