reverse-iterable-map
Advanced tools
Comparing version 1.1.2 to 1.1.3
{ | ||
"name": "reverse-iterable-map", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "A reverse-iterable map implementation based on the built-in Map object", | ||
@@ -5,0 +5,0 @@ "main": "./src/reverse-iterable-map", |
@@ -5,2 +5,4 @@ # reverse-iterable-map | ||
## Table of Contents | ||
@@ -34,2 +36,4 @@ | ||
## Installation | ||
@@ -80,2 +84,4 @@ | ||
## Tests | ||
@@ -89,2 +95,4 @@ | ||
## Documentation | ||
@@ -430,9 +438,9 @@ | ||
iterator.next().value; | ||
//> 1 | ||
//> [0, 1] | ||
iterator.next().value; | ||
//> 2 | ||
//> [1, 2] | ||
iterator.next().value; | ||
//> 4 | ||
//> [2, 4] | ||
@@ -465,9 +473,9 @@ iterator.next().value; | ||
reverseIterator.next().value; | ||
//> 4 | ||
//> [2, 4] | ||
reverseIterator.next().value; | ||
//> 2 | ||
//> [1, 2] | ||
reverseIterator.next().value; | ||
//> 1 | ||
//> [0, 1] | ||
@@ -557,6 +565,6 @@ reverseIterator.next().value; | ||
iterator.next().value; | ||
//> 2 | ||
//> [1, 2] | ||
iterator.next().value; | ||
//> 4 | ||
//> [2, 4] | ||
@@ -570,6 +578,6 @@ iterator.next().value; | ||
reverseIterator.next().value; | ||
//> 2 | ||
//> [1, 2] | ||
reverseIterator.next().value; | ||
//> 1 | ||
//> [0, 1] | ||
@@ -580,2 +588,4 @@ reverseIterator.next().value; | ||
## Why this was implemented | ||
@@ -589,3 +599,3 @@ | ||
**However**, only the iteration in one direction is considered by the [specification](https://www.ecma-international.org/ecma-262/6.0/#sec-iteration) at the time. This means that we only get forward-iteration by default. | ||
**However**, only the iteration in one direction is considered by the [specification](https://www.ecma-international.org/ecma-262/6.0/#sec-iteration) at the time. This means that we only get forward-iteration by default. There is a draft for a proposal to add a `ReverseIterable` interface to the specification: [“The ReverseIterable Interface” by Lee Byron](https://github.com/leebyron/ecmascript-reverse-iterable). | ||
@@ -627,3 +637,3 @@ Now, with the iteration protocols, we could redefine the iteration behavior for our purpose and make an object backwards-iterable. At the same time, this means losing the ability to iterate forwards. | ||
To finally publish a new version, the changes need to be made publich, too. So before putting the `bli` in `publish`, we `push` our updates. | ||
To finally publish a new version, the changes need to be made publich, too. So before putting the `bli` in `publish`, we `push` our updates. Note that we need to push the `v3.1.0` tag as well, so a bare `git push` won’t suffice. | ||
@@ -635,2 +645,2 @@ ```shell | ||
Moments after typing these lines, I ran `npm publish` before pushing the changes. | ||
That’s it. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
48270
848
635