Skip to content
This repository was archived by the owner on Jan 3, 2019. It is now read-only.

Conversation

@dgraham
Copy link
Contributor

@dgraham dgraham commented Mar 16, 2016

Adds all iterator methods from the iterable interface:

  • forEach
  • keys
  • values
  • entries

If Symbol.iterator is available, the URLSearchParams object itself may be used in a for…of loop.

for (var entry of searchParams) {
  console.log(entry)
}

This matches the behavior of Chrome and Firefox.

https://url.spec.whatwg.org/#urlsearchparams
http://heycam.github.io/webidl/#idl-iterable
http://heycam.github.io/webidl/#es-iterable

dgraham added 2 commits March 15, 2016 18:45
Adds all iterator methods from the iterable interface:

- forEach
- keys
- values
- entries

This matches the behavior of Chrome and Firefox.

https://url.spec.whatwg.org/#urlsearchparams
http://heycam.github.io/webidl/#idl-iterable
http://heycam.github.io/webidl/#es-iterable
WebReflection added a commit that referenced this pull request Mar 16, 2016
Implement iterable interface
@WebReflection WebReflection merged commit f94b3e9 into WebReflection:master Mar 16, 2016
@WebReflection
Copy link
Owner

thanks. going to fix travis and double check everything is fine before pushing to npm.

One comment about tests: if you write always the same message ... you can basically write no message at all and it would be the same :D

@dgraham dgraham deleted the iterators branch March 16, 2016 17:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants