Closed nijikokun closed 11 years ago
meh I dont do cross-context stuff really so it doesn't matter to me, we could change the one to Array.isArray()
True, but why prefer that over a cross-compat one?
should isn't built for the browser, it would fail in lots of browsers because of the getters already
True, I suppose then the Array.isArray()
is fine unless you want strict equality.
instanceof
is bad and you should feel bad for using it. Here at least. In the other places... it's more suited because you implicitly state it'sinstanceof
but here it really isn't.https://github.com/visionmedia/should.js/blob/master/lib/should.js#L547 https://github.com/visionmedia/should.js/blob/master/lib/should.js#L675
Object.prototype.toString.call([Object])