summaryrefslogtreecommitdiff
path: root/src/toys/euler-golf/js/json-ds.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/toys/euler-golf/js/json-ds.js')
-rw-r--r--src/toys/euler-golf/js/json-ds.js19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/toys/euler-golf/js/json-ds.js b/src/toys/euler-golf/js/json-ds.js
deleted file mode 100644
index dc7e88e..0000000
--- a/src/toys/euler-golf/js/json-ds.js
+++ /dev/null
@@ -1,19 +0,0 @@
-class JSONSet {
- items = new Set();
-
- constructor(initial) {
- if (Array.isArray(initial)) {
- initial.map((x) => this.apply_set_function("add", x));
- } else {
- this.apply_set_function("add", initial);
- }
-
- ["add", "has", "remove"].forEach(
- (f_name) => (this[f_name] = (x) => this.apply_set_function(f_name, x))
- );
- }
-
- apply_set_function(f_name, x) {
- return this.items[f_name](JSON.stringify(x));
- }
-}