Skip to content

Commit 3fb9c34

Browse files
Merge branch 'master' into sync-b52aa942
2 parents a85cd8f + 08abff9 commit 3fb9c34

6 files changed

Lines changed: 6 additions & 10 deletions

File tree

1-js/03-code-quality/04-ninja-code/article.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ i = i ? i < 0 ? Math.max(0, len + i) : i : 0;
4141
دائو، در سکوت، پنهان است. تنها دائو به خوبی شروع شده و به خوبی کامل می‌شود.
4242
```
4343

44-
<<<<<<< HEAD
4544
یک راه دیگر برای کدنویسی سریع‌تر، استفاده از متغیرهای تک‌حرفی در همه‌جاست. برای مثال: `a`، `b` یا `c`.
46-
=======
47-
Another way to code shorter is to use single-letter variable names everywhere. Like `a`, `b` or `c`.
48-
>>>>>>> b52aa942a8e9b75ba8a65124c22593171e273bb6
4945

5046
همانند یک نینجای واقعی در جنگل، یک متغیر کوتاه در کد ناپدید می‌شود. هیچ‌کس قادر به پیدا کردن آن با استفاده از «جستجو»ی ویرایشگر نخواهد بود. حتی اگر کسی آن را پیدا کند، نخواهد توانست معنی `a` یا `b` را رمزگشایی کند.
5147

1-js/09-classes/02-class-inheritance/3-class-extend-object/rabbit-extends-object.svg renamed to 1-js/09-classes/03-static-properties-methods/3-class-extend-object/rabbit-extends-object.svg

File renamed without changes.

1-js/09-classes/02-class-inheritance/3-class-extend-object/solution.md renamed to 1-js/09-classes/03-static-properties-methods/3-class-extend-object/solution.md

File renamed without changes.

1-js/09-classes/02-class-inheritance/3-class-extend-object/task.md renamed to 1-js/09-classes/03-static-properties-methods/3-class-extend-object/task.md

File renamed without changes.

1-js/11-async/05-promise-api/article.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ If the browser doesn't support `Promise.allSettled`, it's easy to polyfill:
179179
if(!Promise.allSettled) {
180180
Promise.allSettled = function(promises) {
181181
return Promise.all(promises.map(p => Promise.resolve(p).then(value => ({
182-
state: 'fulfilled',
182+
status: 'fulfilled',
183183
value
184184
}), reason => ({
185-
state: 'rejected',
185+
status: 'rejected',
186186
reason
187187
}))));
188188
};
@@ -191,7 +191,7 @@ if(!Promise.allSettled) {
191191
192192
In this code, `promises.map` takes input values, turns them into promises (just in case a non-promise was passed) with `p => Promise.resolve(p)`, and then adds `.then` handler to every one.
193193
194-
That handler turns a successful result `value` into `{state:'fulfilled', value}`, and an error `reason` into `{state:'rejected', reason}`. That's exactly the format of `Promise.allSettled`.
194+
That handler turns a successful result `value` into `{status:'fulfilled', value}`, and an error `reason` into `{status:'rejected', reason}`. That's exactly the format of `Promise.allSettled`.
195195
196196
Now we can use `Promise.allSettled` to get the results of *all* given promises, even if some of them reject.
197197
@@ -277,7 +277,7 @@ There are 5 static methods of `Promise` class:
277277
278278
1. `Promise.all(promises)` -- waits for all promises to resolve and returns an array of their results. If any of the given promises rejects, it becomes the error of `Promise.all`, and all other results are ignored.
279279
2. `Promise.allSettled(promises)` (recently added method) -- waits for all promises to settle and returns their results as an array of objects with:
280-
- `state`: `"fulfilled"` or `"rejected"`
280+
- `status`: `"fulfilled"` or `"rejected"`
281281
- `value` (if fulfilled) or `reason` (if rejected).
282282
3. `Promise.race(promises)` -- waits for the first promise to settle, and its result/error becomes the outcome.
283283
4. `Promise.resolve(value)` -- makes a resolved promise with the given value.

9-regular-expressions/03-regexp-unicode/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Here's the main character categories and their subcategories:
9393
- control `Cc`,
9494
- format `Cf`,
9595
- not assigned `Cn`,
96-
-- private use `Co`,
96+
- private use `Co`,
9797
- surrogate `Cs`.
9898

9999

@@ -127,7 +127,7 @@ alert("number: xAF".match(regexp)); // xAF
127127

128128
Let's look for Chinese hieroglyphs.
129129

130-
There's a unicode property `Script` (a writing system), that may have a value: `Cyrillic`, `Greek`, `Arabic`, `Han` (Chinese) and so on, [here's the full list]("https://en.wikipedia.org/wiki/Script_(Unicode)").
130+
There's a unicode property `Script` (a writing system), that may have a value: `Cyrillic`, `Greek`, `Arabic`, `Han` (Chinese) and so on, [here's the full list](https://en.wikipedia.org/wiki/Script_(Unicode)).
131131

132132
To look for characters in a given writing system we should use `pattern:Script=<value>`, e.g. for Cyrillic letters: `pattern:\p{sc=Cyrillic}`, for Chinese hieroglyphs: `pattern:\p{sc=Han}`, and so on:
133133

0 commit comments

Comments
 (0)