Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于 Node.js 中的异步迭代器 #8084

Merged

Conversation

Isildur46
Copy link
Contributor

译文翻译完成,resolve #8076

Copy link
Contributor

@PassionPenguin PassionPenguin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

翻译得挺棒哒~ @lsvih @Isildur46

# About Async Iterators in Node.js
> Async Iterators can be used when we don't know the values & end state we iterate over. Instead, we get promises eventually resolving to the usual object.
# 关于 Node.js 中的异步迭代器
> 当我们在迭代过程中不清楚值和结束状态时,我们可以使用异步迭代器,用它来解决(resolve)普通对象并最终得到 promise。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 当我们在迭代过程中不清楚值和结束状态时,我们可以使用异步迭代器,用它来解决(resolve)普通对象并最终得到 promise。
> 当我们在迭代过程中不清楚值和结束状态时,我们可以使用异步迭代器,用它来解决(resolve)普通对象并最终得到 promise。

还是空行吧,Markdown 半个规则(

article/2021/About-Async-Iterators-in-Node.js.md Outdated Show resolved Hide resolved
@@ -31,13 +31,13 @@ asyncIterable[Symbol.asyncIterator] = async function*() {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删行吧(

@@ -56,11 +56,11 @@ async function printFileToConsole(path) {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

article/2021/About-Async-Iterators-in-Node.js.md Outdated Show resolved Hide resolved
article/2021/About-Async-Iterators-in-Node.js.md Outdated Show resolved Hide resolved
@@ -176,15 +181,15 @@ try {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

@@ -138,9 +143,9 @@ function catPics({ limit }) {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

@@ -98,7 +101,7 @@ function homebrewFetch(url) {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)


These features have been available in browsers for some time as well, in Chrome since version 63, in Firefox since version 57 and in Safari since version 11.1. They are, however, currently unavailable in IE and Edge.
浏览器支持这些功能已经有一段时间了,Chrome 从 63 版开始支持,Firefox 57 版开始支持,Safari 11.1 版开始支持。然而 IE Edge 目前并不支持。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edge 79:)

Screen Shot 2021-02-27 at 11 40 29 PM

Suggested change
浏览器支持这些功能已经有一段时间了,Chrome 从 63 版开始支持,Firefox 从 57 版开始支持,Safari 从 11.1 版开始支持。然而 IE 和 Edge 目前并不支持。
浏览器支持这些功能已经有一段时间了,Chrome 从 63 版开始支持,Firefox 从 57 版开始支持,Safari 从 11.1 版开始支持,Edge 从 79 版开始支持。然而 IE 目前并不支持。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以以译注的方式给出,最好不要改原文的意思

@Isildur46
Copy link
Contributor Author

已根据校对意见修改。
校对者名字我准备在2个校对完成之后一起加上。

@lsvih
Copy link
Member

lsvih commented Mar 1, 2021

@Isildur46 您加上吧,本文只需要一位校对就行啦

@lsvih lsvih merged commit 2a6a141 into xitu:master Mar 1, 2021
@lsvih
Copy link
Member

lsvih commented Mar 1, 2021

@Isildur46 已经 merge 啦~ 快快麻溜发布到掘金然后给我发下链接,方便及时添加积分哟。

掘金翻译计划有自己的知乎专栏,你也可以投稿哈,推荐使用一个好用的插件
专栏地址:https://zhuanlan.zhihu.com/juejinfanyi

@Isildur46
Copy link
Contributor Author

已发布至掘金 @lsvih
https://juejin.cn/post/6934596464639213576/

@lsvih
Copy link
Member

lsvih commented Mar 1, 2021

收到

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

关于 Node.js 中的异步迭代器
3 participants