Message from JavaScript talks

May 2017

— 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.

Message permanent page

— Interesting

— Strange that this doesn't happen in validation

— Something is messing up here

— Hmm

— I only EVER call add, has or delete with
String(Math.random()).split('.')[1] as the only argument

— It can't handle numbers and doesn't do type conversion

— So it is strict typed

— When you say numbers