Hacker News new | past | comments | ask | show | jobs | submit login

two things about the `null` - the "replacer" function

1. in IE 8, it will choke. it needs to be a function (hopefully you don't have to care about IE 8, though)

2. in all other JSON.strigifable browsers, you can skip it with a falsey value, which is what the `null` is doing here. As a result, you can also use `0` (e.g. stringinfy(foo, 0, 2)), which I like because I can type it faster




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: