Skip to content

Commit

Permalink
Bumped Version
Browse files Browse the repository at this point in the history
- Made CreateContainer properly private (programmatically)
- Finished Documenting the base HashMap
- Removed comments and docs from the browser dist files.
  • Loading branch information
jackmoxley committed May 18, 2021
1 parent 6102340 commit 95c16e2
Show file tree
Hide file tree
Showing 20 changed files with 811 additions and 6,065 deletions.
127 changes: 116 additions & 11 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
* [valuesRight](#valuesright-1)
* [Option](#option)
* [Parameters](#parameters-33)
* [Examples](#examples-26)
* [Examples](#examples-33)
* [size](#size-1)
* [iterator](#iterator-2)
* [none](#none)
Expand All @@ -93,22 +93,22 @@
* [Properties](#properties-1)
* [HashMap#ForEachCallback](#hashmapforeachcallback)
* [Parameters](#parameters-39)
* [Examples](#examples-30)
* [Examples](#examples-37)
* [HashMap#MatchesPredicate](#hashmapmatchespredicate)
* [Parameters](#parameters-40)
* [Examples](#examples-31)
* [Examples](#examples-38)
* [HashMap#ReduceFunction](#hashmapreducefunction)
* [Parameters](#parameters-41)
* [Examples](#examples-32)
* [Examples](#examples-39)
* [isFunction](#isfunction)
* [Parameters](#parameters-42)
* [Examples](#examples-33)
* [Examples](#examples-40)
* [isIterable](#isiterable)
* [Parameters](#parameters-43)
* [Examples](#examples-34)
* [Examples](#examples-41)
* [isString](#isstring)
* [Parameters](#parameters-44)
* [Examples](#examples-35)
* [Examples](#examples-42)
* [sameValue](#samevalue)
* [Parameters](#parameters-45)
* [sameValueZero](#samevaluezero)
Expand All @@ -119,7 +119,7 @@
* [Parameters](#parameters-48)
* [hammingWeight](#hammingweight)
* [Parameters](#parameters-49)
* [Examples](#examples-36)
* [Examples](#examples-43)
* [hash](#hash)
* [Parameters](#parameters-50)
* [hashCodeFor](#hashcodefor)
Expand All @@ -130,9 +130,9 @@
* [Parameters](#parameters-53)
* [some](#some-2)
* [Parameters](#parameters-54)
* [Examples](#examples-37)
* [Examples](#examples-44)
* [none](#none-1)
* [Examples](#examples-38)
* [Examples](#examples-45)

### HashMap

Expand Down Expand Up @@ -1479,30 +1479,135 @@ Returns **any** the final accumulated value.

Iterates over all the entries in the map.

##### Examples

iterate over the map

```javascript
const hashmap = new HashMap([[1,'value1'],[2,'value2'],[3,'value3']]);
for ([key, value] of hashmap) {
console.log(key,value);
}
// logs:
// 1 value1
// 2 value2
// 3 value3
```

#### entries

Iterates over all the entries in the map.

##### Examples

iterate over the map

```javascript
const hashmap = new HashMap([[1,'value1'],[2,'value2'],[3,'value3']]);
for ([key, value] of hashmap.entries()) {
console.log(key,value);
}
// logs:
// 1 value1
// 2 value2
// 3 value3
```

#### entriesRight

Iterates over all the entries in the map.
Iterates over all the entries in the map in reverse.

##### Examples

iterate over the map in reverse

```javascript
const hashmap = new HashMap([[1,'value1'],[2,'value2'],[3,'value3']]);
for ([key, value] of hashmap.entriesRight()) {
console.log(key,value);
}
// logs:
// 3 value3
// 2 value2
// 1 value1
```

#### keys

Iterates over all the keys in the map.

##### Examples

iterate over the keys

```javascript
const hashmap = new HashMap([[1,'value1'],[2,'value2'],[3,'value3']]);
for (const key of hashmap.keys()) {
console.log(key);
}
// logs:
// 1
// 2
// 3
```

#### values

Iterates over all the values in the map.

##### Examples

iterate over the values

```javascript
const hashmap = new HashMap([[1,'value1'],[2,'value2'],[3,'value3']]);
for (const value of hashmap.values()) {
console.log(value);
}
// logs:
// value1
// value2
// value3
```

#### keysRight

Iterates over all the keys in the map in reverse.

##### Examples

iterate over the keys

```javascript
const hashmap = new HashMap([[1,'value1'],[2,'value2'],[3,'value3']]);
for (const key of hashmap.keysRight()) {
console.log(key);
}
// logs:
// 3
// 2
// 1
```

#### valuesRight

Iterates over all the values in the map in reverse.

##### Examples

iterate over the values

```javascript
const hashmap = new HashMap([[1,'value1'],[2,'value2'],[3,'value3']]);
for (const value of hashmap.valuesRight()) {
console.log(value);
}
// logs:
// value3
// value2
// value1
```

### LinkedHashMap

**Extends HashMap**
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog
## Current
## 1.0.6
- Made CreateContainer properly private (programmatically)
- Finished Documenting the base HashMap
- Removed comments and docs from the browser dist files.
## 1.0.5
- Updated Dev Dependencies.
- Added more documentation.
Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ const hashmap = new HashMap(forEachObj);
* It must have an identical interface to JS Map
* It must be fully written in JS. (Transpiling is acceptable) So that we can guarantee it works in the browser, not just node.

### Benchmarks on version 1.0.5
### Benchmarks on version 1.0.6

![Set Get And Delete](BenchmarkSGD.png)

Expand Down
2 changes: 1 addition & 1 deletion benchmark_results/benchmarks.create.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion benchmark_results/benchmarks.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mootable/hashmap",
"version": "1.0.5",
"version": "1.0.6",
"description": "HashMap Implementation for JavaScript",
"homepage": "https://github.com/mootable/hashmap",
"main": "./hashmap.js",
Expand Down
Loading

0 comments on commit 95c16e2

Please sign in to comment.