HydrateJS
HydrateJS copied to clipboard
should serialize undefined
If you add undefined to the list of primitives, the "should serialize primitives" test fails:
it("should serialize primitives", function() {
var inputs = [undefined, 3, "foo", ["a", 3, "bar"]]
Thanks BallBearing, should be fixed in above commit.
There still appears to be problems with this.
var hydrate = new Hydrate();
hydrate.parse(hydrate.stringify([undefined])); // => ["__hydrate_undef"]
Hi @skeeto -- can you double-check? I'm running those exact commands and I'm getting [undefined] as expected.
Using the pre-compiled version hosted here:
http://blog.maxaller.name/hydrate/gen/Hydrate.js (sha1sum: 6009764ff0659af87a44b1d4ecbb0d708a4c73df)
I'm still getting ["__hydrate_undef"] with both Firefox and Chrome.
Ah. Yes, that probably hasn't been updated -- it doesn't happen automatically. I'm making some more changes today, but I'll update it after that. I'm making some changes that will make it easier to compile it yourself, too.