@agoric/internal 0.2.2-dev-7443b3e.0 → 0.2.2-dev-e7427e3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/utils.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/internal",
3
- "version": "0.2.2-dev-7443b3e.0+7443b3e",
3
+ "version": "0.2.2-dev-e7427e3.0+e7427e3",
4
4
  "description": "Externally unsupported utilities internal to agoric-sdk",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -36,5 +36,5 @@
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "gitHead": "7443b3ed63abd9e69f2b2f74a754fd826a974456"
39
+ "gitHead": "e7427e386bcbfbe99312b41342b1fa2e722c57c7"
40
40
  }
package/src/utils.js CHANGED
@@ -11,8 +11,8 @@ const { details: X, quote: q } = assert;
11
11
 
12
12
  /**
13
13
  * Throws if multiple entries use the same property name. Otherwise acts
14
- * like `Object.fromEntries`. Use it to protect from property names
15
- * computed from user-provided data.
14
+ * like `Object.fromEntries` but hardens the result.
15
+ * Use it to protect from property names computed from user-provided data.
16
16
  *
17
17
  * @template K,V
18
18
  * @param {Iterable<[K,V]>} allEntries
@@ -20,7 +20,7 @@ const { details: X, quote: q } = assert;
20
20
  */
21
21
  export const fromUniqueEntries = allEntries => {
22
22
  const entriesArray = [...allEntries];
23
- const result = fromEntries(entriesArray);
23
+ const result = harden(fromEntries(entriesArray));
24
24
  if (ownKeys(result).length === entriesArray.length) {
25
25
  return result;
26
26
  }