@agoric/store
Advanced tools
Comparing version 0.0.4 to 0.1.0
@@ -6,2 +6,18 @@ # Change Log | ||
# [0.1.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/store@0.0.4...@agoric/store@0.1.0) (2020-05-04) | ||
### Bug Fixes | ||
* use the new (typed) harden package ([2eb1af0](https://github.com/Agoric/agoric-sdk/commit/2eb1af08fe3967629a3ce165752fd501a5c85a96)) | ||
### Features | ||
* implement channel host handler ([4e68f44](https://github.com/Agoric/agoric-sdk/commit/4e68f441b46d70dee481387ab96e88f1e0b69bfa)) | ||
## [0.0.4](https://github.com/Agoric/agoric-sdk/compare/@agoric/store@0.0.4-alpha.0...@agoric/store@0.0.4) (2020-04-13) | ||
@@ -8,0 +24,0 @@ |
{ | ||
"name": "@agoric/store", | ||
"version": "0.0.4", | ||
"version": "0.1.0", | ||
"description": "Wrapper for JavaScript map", | ||
@@ -31,4 +31,4 @@ "main": "src/store.js", | ||
"dependencies": { | ||
"@agoric/assert": "^0.0.4", | ||
"@agoric/harden": "^0.0.4" | ||
"@agoric/assert": "^0.0.5", | ||
"@agoric/harden": "^0.0.8" | ||
}, | ||
@@ -88,3 +88,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "a5fe2624fedcf3b8adf46ed6c157c29fd459b2ed" | ||
"gitHead": "534d1a65d79f9dd176cc670f374c9de2cd081a7e" | ||
} |
// Copyright (C) 2019 Agoric, under Apache license 2.0 | ||
// @ts-check | ||
import harden from '@agoric/harden'; | ||
import rawHarden from '@agoric/harden'; | ||
import { assert, details, openDetail } from '@agoric/assert'; | ||
const harden = /** @type {<T>(x: T) => T} */ (rawHarden); | ||
/** | ||
* @template K,V | ||
* @typedef {Object} Store A wrapper around a Map | ||
* @property {(key: K) => boolean} has Check if a key exists | ||
* @property {(key: K, value: V) => void} init Initialize the key only if it doesn't already exist | ||
* @property {(key: K) => V?} get Return a value fo the key, or undefined | ||
* @property {(key: K, value: V) => void} set Unconditionally set the key | ||
* @property {(key: K) => void} delete Remove the key | ||
* @property {() => K[]} keys Return an array of keys | ||
* @property {() => V[]} values Return an array of values | ||
* @property {() => [K, V][]} entries Return an array of entries | ||
*/ | ||
/** | ||
* Distinguishes between adding a new key (init) and updating or | ||
@@ -11,3 +28,5 @@ * referencing a key (get, set, delete). | ||
* `set` and `delete` are only allowed if the key does already exist. | ||
* @template K,V | ||
* @param {string} keyName - the column name for the key | ||
* @returns {Store.<K,V>} | ||
*/ | ||
@@ -14,0 +33,0 @@ function makeStore(keyName = 'key') { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18021
61
+ Added@agoric/assert@0.0.5(transitive)
+ Added@agoric/harden@0.0.8(transitive)
+ Added@agoric/make-hardener@0.0.8(transitive)
- Removed@agoric/assert@0.0.4(transitive)
- Removed@agoric/harden@0.0.4(transitive)
- Removed@agoric/make-hardener@0.0.4(transitive)
Updated@agoric/assert@^0.0.5
Updated@agoric/harden@^0.0.8