Skip to content

Commit cc6fd2a

Browse files
committed
Resolve conflicts
1 parent 9ac5203 commit cc6fd2a

File tree

6 files changed

+2
-51
lines changed

6 files changed

+2
-51
lines changed

1-js/03-code-quality/02-coding-style/article.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -329,13 +329,8 @@ Aqui está um exemplo de um ficheiro `.eslintrc`:
329329
},
330330
"rules": {
331331
"no-console": 0,
332-
<<<<<<< HEAD
333-
},
334-
"indent": 2
335-
=======
336332
"indent": 2
337333
}
338-
>>>>>>> dccca58f268ad6d5a6f2160613a8ea3c5cd53a2d
339334
}
340335
```
341336

1-js/03-code-quality/06-polyfills/article.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,8 @@ Actually, there are two parts in Babel:
2323

2424
2. Second, the polyfill.
2525

26-
<<<<<<< HEAD
27-
The transpiler rewrites the code, so syntax features are covered. But for new functions we need to write a special script that implements them. JavaScript is a highly dynamic language, scripts may not just add new functions, but also modify built-in ones, so that they behave according to the modern standard.
28-
=======
2926
New language features may include not only syntax constructs, but also built-in functions.
3027
The transpiler rewrites the code, transforming syntax constructs into older ones. But as for new built-in functions, we need to implement them. JavaScript is a highly dynamic language, scripts may add/modify any functions, so that they behave according to the modern standard.
31-
>>>>>>> dccca58f268ad6d5a6f2160613a8ea3c5cd53a2d
3228

3329
There's a term "polyfill" for scripts that "fill in" the gap and add missing implementations.
3430

1-js/08-prototypes/01-prototype-inheritance/article.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ In JavaScript, objects have a special hidden property `[[Prototype]]` (as named
1212

1313
![prototype](object-prototype-empty.svg)
1414

15-
<<<<<<< HEAD
16-
That `[[Prototype]]` has a "magical" meaning. When we want to read a property from `object`, and it's missing, JavaScript automatically takes it from the prototype. In programming, such thing is called "prototypal inheritance". Many cool language features and programming techniques are based on it.
17-
=======
1815
When we read a property from `object`, and it's missing, JavaScript automatically takes it from the prototype. In programming, such thing is called "prototypal inheritance". And soon we'll study many examples of such inheritance, as well as cooler language features built upon it.
19-
>>>>>>> dccca58f268ad6d5a6f2160613a8ea3c5cd53a2d
2016

2117
The property `[[Prototype]]` is internal and hidden, but there are many ways to set it.
2218

@@ -127,13 +123,9 @@ alert(longEar.jumps); // true (from rabbit)
127123

128124
![](proto-animal-rabbit-chain.svg)
129125

130-
<<<<<<< HEAD
131-
There are actually only two limitations:
132-
=======
133126
Now if we read something from `longEar`, and it's missing, JavaScript will look for it in `rabbit`, and then in `animal`.
134127

135128
There are only two limitations:
136-
>>>>>>> dccca58f268ad6d5a6f2160613a8ea3c5cd53a2d
137129

138130
1. The references can't go in circles. JavaScript will throw an error if we try to assign `__proto__` in a circle.
139131
2. The value of `__proto__` can be either an object or `null`, other types (like primitives) are ignored.

1-js/11-async/06-promisify/article.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@ let loadScriptPromise = function(src) {
4646
// loadScriptPromise('path/script.js').then(...)
4747
```
4848

49-
<<<<<<< HEAD
50-
Now `loadScriptPromise` fits well in our promise-based code.
51-
=======
5249
As we can see, the new function is a wrapper around the original `loadScript` function. It calls it providing its own callback that translates to promise `resolve/reject`.
53-
>>>>>>> dccca58f268ad6d5a6f2160613a8ea3c5cd53a2d
5450

5551
Now `loadScriptPromise` fits well in promise-based code. If we like promises more than callbacks (and soon we'll see more reasons for that), then we will use it instead.
5652

@@ -90,14 +86,10 @@ Here, `promisiefy` assumes that the original function expects a callback with ex
9086

9187
But what if the original `f` expects a callback with more arguments `callback(err, res1, res2)`?
9288

93-
<<<<<<< HEAD
94-
Here's a modification of `promisify` that returns an array of multiple callback results:
95-
=======
9689
We can improve our helper. Let's make a more advanced version of `promisify`.
9790

9891
- When called as `promisify(f)` it should work similar to the version above.
9992
- When called as `promisify(f, true)`, it should return the promise that resolves with the array of callback results. That's exactly for callbacks with many arguments.
100-
>>>>>>> dccca58f268ad6d5a6f2160613a8ea3c5cd53a2d
10193

10294
```js
10395
// promisify(f, true) to get array of results

1-js/13-modules/02-import-export/article.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,7 @@ export {default as User} from './user.js'; // reexporta o default
321321

322322
Por que isso seria necessário? Vamos ver um caso de uso prático.
323323

324-
<<<<<<< HEAD
325-
Imagine que estamos escrevendo um "pacote": uma pasta com muitos módulos, com algumas funcionalidades exportadas (ferramentas como NPM permitem publicar e distribuir esses pacotes), e muitos módulos são apenas "auxiliares", para uso interno em outro pacote de módulos.
326-
=======
327324
Imagine, we're writing a "package": a folder with a lot of modules, with some of the functionality exported outside (tools like NPM allow us to publish and distribute such packages, but we don't have to use them), and many modules are just "helpers", for internal use in other package modules.
328-
>>>>>>> dccca58f268ad6d5a6f2160613a8ea3c5cd53a2d
329325

330326
A estrutura de arquivos pode ser assim:
331327
```
@@ -382,11 +378,7 @@ export {default as User} from './user.js';
382378

383379
O export default precisa de um tratamento separado ao reexportar.
384380

385-
<<<<<<< HEAD
386-
Vamos dizer que temos `user.js` com o `export default class User`, e gostaríamos de o reexportar:
387-
=======
388381
Let's say we have `user.js` with the `export default class User` and would like to re-export it:
389-
>>>>>>> dccca58f268ad6d5a6f2160613a8ea3c5cd53a2d
390382

391383
```js
392384
// 📁 user.js
@@ -395,14 +387,8 @@ export default class User {
395387
}
396388
```
397389

398-
<<<<<<< HEAD
399-
Podemos encontrar dois problemas:
400-
=======
401390
We can come across two problems with it:
402391

403-
1. `export User from './user.js'` won't work. That would lead to a syntax error.
404-
>>>>>>> dccca58f268ad6d5a6f2160613a8ea3c5cd53a2d
405-
406392
1. `export User from './user.js'` não funcionará. Isso levaria a um erro de sintaxe.
407393

408394
Para reexportar o export default, nós temos que escrever `export {default as User}`, como no exemplo acima.
@@ -415,11 +401,7 @@ We can come across two problems with it:
415401
export {default} from './user.js'; // para reexportar o export default
416402
```
417403

418-
<<<<<<< HEAD
419-
Essas esquisitices de reexportar o export default são um dos motivos pelos quais alguns desenvolvedores não gostam de default exports e preferem os nomeados.
420-
=======
421-
Such oddities of re-exporting a default export are one of the reasons why some developers don't like default exports and prefer named ones.
422-
>>>>>>> dccca58f268ad6d5a6f2160613a8ea3c5cd53a2d
404+
Essas esquisitices de reexportar um default export são um dos motivos pelos quais alguns desenvolvedores não gostam de default exports e preferem os nomeados.
423405

424406
## Resumo
425407

9-regular-expressions/17-regexp-methods/article.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,9 @@ Possui 3 modos:
1919
alert( result[1] ); // Script (primeira captura de grupo)
2020
alert( result.length ); // 2
2121

22-
<<<<<<< HEAD
2322
// Informação adicional:
24-
alert( result.index ); // 0 (posição da correspondÊncia)
23+
alert( result.index ); // 0 (posição da correspondência)
2524
alert( result.input ); // Eu amo JavaScript (string original)
26-
=======
27-
// Additional information:
28-
alert( result.index ); // 7 (match position)
29-
alert( result.input ); // I love JavaScript (source string)
30-
>>>>>>> dccca58f268ad6d5a6f2160613a8ea3c5cd53a2d
3125
```
3226

3327
2. Se a `regexp` tiver a flag `padrão:g`, ela retornará uma matriz de todas as correspondências como strings, sem capturar grupos e outros detalhes.

0 commit comments

Comments
 (0)