geraintluff/tv4 — pull request #4 by natesilva (2013-01-23 22:13:10+00:00)
Title: Nodejs support

Minimal change to allow using tv4 in Node.js. Usage:

```
var tv4 = require('./tv4.js').tv4;
tv4.validate(…);
```

This change should not break existing in-browser usage of tv4. All tests pass in the following browsers (except one `$ref` test that was failing even before I made this change):

* Safari 6 Mac
* Firefox 18 Mac
* Chrome 24 Mac
* Chrome 24 Win 8
* IE 10 Win 8

For the following browsers, some of the `enum` tests fail, but the same tests also failed before this change:

* IE 9 Win 7 (using es5-shim)
* IE 9 Vista (using es5-shim)
* IE 8 Win XP SP 3 (using es5-shim)

All the tests (except the aforementioned `$ref` test) passed in the following environment using a quick-n-dirty test wrapper:

* Node 0.8.15 (on Mac OS X 10.8.2)

I have not used tv4 seriously yet. I had to get Node.js support first.