Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@agoric/store

Package Overview
Dependencies
Maintainers
5
Versions
2528
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agoric/store - npm Package Compare versions

Comparing version 0.0.4 to 0.1.0

16

CHANGELOG.md

@@ -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 @@

8

package.json
{
"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') {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc