Message from JavaScript discussions
May 2017
— I bet this might be slow as balls
If it is, I'd remove the "uniques" list first since it becomes less useful as more items are added, and the main set's structure is already highly optimized
— Oh whoops, I noticed a naming collision just now
— Still works, but I will fix just because it bothers me to look at it, haha, it's in typeCheck
— TrgwiiLappy:~/.node_modules$ node set.perf.js
validating arrset.js...
validating set.js...
validating stringSet.js...
/home/trgwii/.node_modules/set.test.js:7
const set = new Set();
^
TypeError: Set is not a constructor
— Well
— Oh...
— Validating stringSet.js...
{ H: { '5': [ 'Hello' ] } }
{ H: 1, e: 1, l: 2, o: 1 }
{ H: { '4': [ 'Hell' ], '5': [ 'Hello' ] } }
{ H: 2, e: 2, l: 4, o: 1 }
{ H: { '4': [ 'Hell' ], '5': [ 'Hello' ] },
T: { '4': [ 'True' ] } }
{ H: 2, e: 3, l: 4, o: 1, T: 1, r: 1, u: 1 }
{ H: { '4': [ 'Hell' ] }, T: { '4': [ 'True' ] } }
{ H: 1, e: 2, l: 2, T: 1, r: 1, u: 1 }
assert.js:81
throw new assert.AssertionError({
^
AssertionError: delete returns falsy for values in the set
— Fixed that too
— /home/trgwii/.node_modules/sets/stringSet.js:8
throw new errorType(message);
^
TypeError: Parameter 1 must be of type String.
— Interesting
— Strange that this doesn't happen in validation