virtualstate / navigation

Native JavaScript navigation [web api] implementation
MIT License
77 stars 5 forks source link

Implement async iterator #2

Closed fabiancook closed 2 years ago

fabiancook commented 2 years ago

🚀 Feature Proposal

A clear and concise description of what the feature is.

Motivation

To allow native for await usage

Example

const navigations = appHistory
  .filter(isNavigateEvent)
  .map(e => e.destination.url)

for await (const url of navigations) {
  console.log({ url }); 
}
fabiancook commented 2 years ago

Out of scope