mathiasbynens/tpyo — pull request #6 by sudodoki (2014-11-16 13:39:10+00:00)
Title: Fix console.log calling inspect => unshift on arrays

This should fix #5.
The issue was caused by that `inspect` is a dynamic introspection property, that wouldn't 'be there' thus making it special. Since it wasn't found in the target, Levenstein would treat `unshift` as best alternative and use that.
Had [similar issue](https://github.com/sudodoki/aleph-box/blob/master/lib/randomObject.js#L33) with my aleph-box, but I ended up solving it somewhat different, having an ability to change the object being proxied.
Another possible solution is to change `tpyo` to be something like
```
function tpyo(something) {
if (!something.inspect) {
Object.defineProperty(something, 'inspect', {
enumerable: false,
writable: true,
value: something.inspect
})
}
return Proxy(something, {
'get': getProperty
});
}
```
`toJSON` was put in because test was failing doing `JSON.stringify` otherwise