Skip to content

Commit

Permalink
Fixing dump("indexes") such that Map keys remain the correct type, …
Browse files Browse the repository at this point in the history
…updating tests - breaking change to support primitives again
  • Loading branch information
avoidwork committed Sep 3, 2020
1 parent bc72535 commit 629dae8
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 36 deletions.
6 changes: 3 additions & 3 deletions lib/haro.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @author Jason Mulligan <jason.mulligan@avoidwork.com>
* @copyright 2020
* @license BSD-3-Clause
* @version 8.0.4
* @version 9.0.0
*/
"use strict";

Expand Down Expand Up @@ -299,7 +299,7 @@
const result = true;

if (type === "indexes") {
this.indexes = new Map(Object.keys(data).map(i => [i, new Map(Object.keys(data[i]).map(p => [p, new Set(data[i][p])]))]));
this.indexes = new Map(data.map(i => [i[0], new Map(i[1].map(ii => [ii[0], new Set(ii[1])]))]));
} else if (type === "records") {
this.indexes.clear();
this.data = new Map(data);
Expand Down Expand Up @@ -477,7 +477,7 @@
return obj;
}

factory.version = "8.0.4";
factory.version = "9.0.0";

// Node, AMD & window supported
if (typeof exports !== "undefined") {
Expand Down
4 changes: 2 additions & 2 deletions lib/haro.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 629dae8

Please sign in to comment.