Popke: Hello, what are the safest workarounds for .keys if you aren’t if client browsers will support it?
Defilippi: In an ideal world the commands would be seperate files or the pairs would be, like join and unjoin
Awbrey: Giraffe_: ah. I see. Your conditions are very complicated. You could start by having a function that maps those conditions to a particular “command identifier”. And then you can use that “command identifier” to select the right operation.
Card: But im not too sure how to do that w/ JavaScript
Cosenza: Not sure what you mean Dekok, like ‘ifcommand.indexOfcommand { checkPossibilities? }’
Rudio: Straight: What is the best way to check if a variable is a Boolean, Number or String wrapper type?
Lauritsen: Giraffe_: https://www.npmjs.com/package/commander
Billeaudeau: If that’s not cute, i can’t help
Franculli: Giraffe_: https://gist.github.com/robotlolita/690c420df5a455831386
Ripplinger: Or if anyone knows the answer to my question. XD
Abeta: Since we can’t rely on Object.prototype.toString to be reliable anymore.
Daniel: Gilgameshkun: Objecta === a will tell you if a is an object type
Diekman: I mean the wrapper types specifically, by wrapper type.
Ader: You then just need to check if it’s also a string/Boolean/Number
Liljenquist: Yes, Dekok, I want to know how to do *that*.
Glassey: And Dekok I can also p*** args yes to the command correct?
Moyse: I already know how to check if a variable is any non-null object.
Depaola: Gilgameshkun: Object1 === 1 is false, var a = new Number1; Objecta === a is true.
Perrodin: Not sure how to do that with your code snippet
Chinnis: Because I need to make sure its in the correct lobby and such
Julye: I know, Dekok. I want to be able to tell Boolean, Number and String apart.
Tyron: Gilgameshkun: you can use Object.prototype.toString.call to check things in ES5. For ES6 it’s a little bit more tricky, there are packages on npm for this. is-number-object, is-string-object, and is-boolean-object, iirc
Giambattista: I’ll look for those packages, thanks.
Connors: Gilgameshkun: right, you need *both* checks
Lazo: Hm, I know nothing about the Symbol API. I wanna learn.
Liggans: I kinda wish there were a concrete comprehensive ES6 reference.
Wakley: Gilgameshkun: ECMAScript 2015 Language Specification – ECMA-262 6th Edition http://www.ecma-international.org/ecma-262/6.0/
Stockhoff: Wait, there’s a new “symbol” typeof?
Rauhuff: Gilgameshkun: yes. And potentially several implementation-specific ones
Kirsten: Dekok: should my catch statements be in commands {} or toCommand {}?
Utvik: Like ‘incorrect amount of args’
Cuda: Giraffe_: each command should handle their own argument parsing
Markevich: Right now if toChannel == config.mainChannel {} else { say’wrong channel’
Marvier: So in each command in commands, not in the toCommand function
Trucchi: Robdubya: I should really look at the code for rxNext, I might end up abandoning plans to make my own, heh
Zimmerebner: The only role of the toCommand function should be deciding what the command was. Anything other than that should be elsewhere :
Buehl: Well, and p***ing extra args
Trucchi: What I really want is a hybrid of CSP channels and Observables
Correl: Trucchi: robdubya: rxNext?
Trucchi: Dekok: what they call the next version of RxJS, which is built around a spec-compliant Observable
Salmela: Trucchi: is it going to be smaller?
Trucchi: Or, ES7-as-currently-proposed-spec-compliant anyway
Cavaco: I think maybe my math is somehow wrong of how im going from 2d to 1d aray in this grid check