Don't use `instanceof` in lib/util.js "is" checks.
authorNathan Rajlich <nathan@tootallnate.net>
Wed, 26 Oct 2011 04:42:23 +0000 (21:42 -0700)
committerkoichik <koichik@improvement.jp>
Wed, 26 Oct 2011 19:33:24 +0000 (04:33 +0900)
commit2dbb470ea10697f7514094934dfbf635969b8566
treeb75027ba9b36675e034cdff90b74f1361fe64158
parent194511ff1a0309e01f6cad03292ccc2e67134390
Don't use `instanceof` in lib/util.js "is" checks.

While using `instanceof`, these functions could easily be faked with something
like:  Object.create(Date.prototype)

So let's just not use it at all. A little slower, but these functions are only
used in the REPL / for debugging so it's OK.

Fixes #1941.
Fixes #1942.
lib/util.js