atom/season — pull request #3 by johan (2014-12-03 01:25:09+00:00)
Title: CSON.stringify

As of https://github.com/groupon/cson-safe/pull/9 the upstream `cson-safe` offers a `CSON.stringify` that behaves just as JSON.stringify does, but with safe/nice CSON defaults:

```
"foo\nbar" => '''
foo
bar
'''
```

Like [the native `JSON.stringify`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify), it leaves to the consumer to decide how to encode or handle non-JSON/CSON:able properties like Function objects and similar; I adjusted tests to match, but kept the existing exceptions for cson:ing `undefined` or a plain `Function` root-level object. Less code to maintain, if you want to avoid duplicating functionality.