From 39b1ae0fbfa9cdfb0cfff3ec577d5e42ddcc0b1a Mon Sep 17 00:00:00 2001 From: KuhnChris Date: Wed, 1 May 2019 17:03:51 +0200 Subject: [PATCH 1/4] uport-project -> 3box Even more changes! --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index ae72ab87..8341b22f 100644 --- a/package.json +++ b/package.json @@ -34,14 +34,14 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/uport-project/3box-js.git" + "url": "git+https://github.com/3box/3box-js.git" }, "author": "3box ", "license": "Apache-2.0", "bugs": { - "url": "https://github.com/uport-project/3box-js/issues" + "url": "https://github.com/3box/3box-js/issues" }, - "homepage": "https://github.com/uport-project/3box-js#readme", + "homepage": "https://github.com/3box/3box-js#readme", "dependencies": { "@babel/runtime": "^7.1.2", "did-jwt": "^0.1.1", From 837d6337ee987c91a2ef3bf8d8e76131ce5d95b0 Mon Sep 17 00:00:00 2001 From: Jonathan Schwartz Date: Mon, 29 Apr 2019 15:35:42 -0400 Subject: [PATCH 2/4] feat(api): add setMultiple --- readme-template.md | 15 +++++++++++- src/__mocks__/keyValueStore.js | 12 ++++++++++ src/__tests__/keyValueStore.test.js | 8 +++++++ src/__tests__/privateStore.test.js | 17 ++++++++++++++ src/__tests__/publicStore.test.js | 16 ++++++++++++- src/__tests__/space.test.js | 36 +++++++++++++++++++++++++---- src/keyValueStore.js | 26 ++++++++++++++++++++- src/privateStore.js | 7 ++++++ src/publicStore.js | 8 ++++++- src/space.js | 13 ++++++++++- src/utils/index.js | 10 ++++++++ 11 files changed, 159 insertions(+), 9 deletions(-) diff --git a/readme-template.md b/readme-template.md index 12477186..4ad0bef5 100644 --- a/readme-template.md +++ b/readme-template.md @@ -88,6 +88,19 @@ await box.private.set('email', 'oed@email.service') await box.private.remove('email') ``` +##### Set multiple fields at once: +```js +const fields = ['name', 'website', 'employer'] +const values = ['Jon Schwartz', 'openworklabs.com', 'Open Work Labs'] + +await box.public.setMultiple(fields, values) + +const privateFields = ['age', 'coinBalance'] +const privateValues = ['xxx', 'yyy'] + +await box.private.setMultiple(privateFields, privateValues) +``` +