Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 212f7e7

Browse files
committed
UPDATE
1 parent 0dfe7c9 commit 212f7e7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎JS/JS-br.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -688,12 +688,13 @@ var load = function (module) {
688688
};
689689
```
690690
691-
Let's then talk about `module.exports` and `exports`, which have similar usage, but one cannot assign a value to `exports` directly. The assignment would be a no-op.
691+
Vamos então falar sobre `module.exports` e `exports`, que tem uso similar, mas um não atribui um valor para `exports` diretamente. A tarefa seria um no-op.
692692
693-
The differences between the modularizations in `CommonJS` and in ES6 are:
693+
A diferença entre as modularizações no `CommonJS` a no ES6 são:
694694
695-
- The former supports dynamic imports, which is `require(${path}/xx.js)`; the latter doesn't support it yet, but there have been proposals.
696-
- The former uses synchronous imports. Since it is used on the server end and files are local, it doesn't matter much even if the synchronous imports block the main thread. The latter uses asynchronous imports, because it is used in browsers in which file downloads are needed. Rendering process would be affected much if asynchronous import was used.
695+
- O antigo suporta importes dinamico, que é `require(${path}/xx.js)`; o último não suporta isso ainda, mas
696+
existem propostas.
697+
- O antigo usa importes síncronos. Desde de que usado no servidor os arquivos são locais, não importa muito mesmo se o import síncrono bloqueia a main thread. O último usa importe assíncrono, porque ele é usado no navegador em que os arquivos baixados são precisos. O processo de rendereização seria afetado muito se assíncrono importe for usado.
697698
- The former copies the values when exporting. Even if the values exported change, the values imported will not change. Therefore, if values shall be updated, another import needs to happen. However, the latter uses realtime bindings, the values imported and exported point to the same memory addresses, so the imported values change along with the exported ones.
698699
- In execution the latter is compiled to `require/exports`.
699700

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /