From 48af24fd3d085c736000e4fc0a7babdd40faefbe Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Wed, 5 May 2021 08:37:28 -0400 Subject: [PATCH] Util fn in gun test file --- guntest.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/guntest.html b/guntest.html index 861398fb..2fa7cea8 100644 --- a/guntest.html +++ b/guntest.html @@ -7,7 +7,7 @@ Document - + @@ -34,6 +34,12 @@ const UPPER = 100 + clearSet = (node) => { + node.map().once((_, key) => { + node.get(key).put(null) + }) + } + put = async () => { const res = await fetch(`https://jsonplaceholder.typicode.com/posts`) /** @type {Array} */ @@ -55,7 +61,7 @@ }) }) } - +