ljharb / es-abstract

ECMAScript spec abstract operations.
MIT License
114 stars 30 forks source link

[New] `ES2018+`: Add `CreateAsyncFromSyncIterator` #105

Open ExE-Boss opened 4 years ago

ExE-Boss commented 4 years ago

Needed for https://github.com/ljharb/es-abstract/pull/68 and implementing iterator‑helpers.

codecov[bot] commented 4 years ago

Codecov Report

Merging #105 into master will decrease coverage by 0.58%. The diff coverage is 47.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #105      +/-   ##
==========================================
- Coverage   90.89%   90.30%   -0.59%     
==========================================
  Files         670      673       +3     
  Lines        9444     9574     +130     
  Branches     2195     2199       +4     
==========================================
+ Hits         8584     8646      +62     
- Misses        860      928      +68     
Impacted Files Coverage Δ
es2018.js 100.00% <ø> (ø)
es2019.js 100.00% <ø> (ø)
2018/CreateAsyncFromSyncIterator.js 37.50% <37.50%> (ø)
2019/CreateAsyncFromSyncIterator.js 37.50% <37.50%> (ø)
helpers/AsyncFromSyncIterator.js 49.09% <49.09%> (ø)
GetIntrinsic.js 93.91% <0.00%> (-1.59%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4e8d479...a0eedfa. Read the comment docs.

ExE-Boss commented 4 years ago

I think a potentially better option might be to implement a AsyncFromSyncIterator helper in a separate package, and then have ES‑Abstract depend on it.

ljharb commented 4 years ago

Yeah, you're probably right - a separate package just for AsyncIterator probably makes sense, especially given the iterator helpers proposal.

I'll make these packages over the next few days and then update here.

ExE-Boss commented 4 years ago

I have a work in progress implementation of the Iterator Helpers proposal in: @ExE‑Boss/Iterator‑Helpers.