pandastrike / fairmont

Functional (and) reactive programming library for JavaScript.
ISC License
49 stars 8 forks source link

stringify #43

Closed freeformflow closed 9 years ago

freeformflow commented 9 years ago

@dyoder, this was a function you mentioned earlier today. This provides JSON stringification with a null replacer and a tabstop of 2 whitespaces. Hopefully this is straight-forward enough even I can get it, haha. Though, I'm not sure if it should be considered a "string" function or an "object" function.

# Provide JSON object stringification with a `null` replacer and a tabstop of 2 whitespaces. 
stringify = (object) ->  JSON.stringify object, null, 2 
dyoder commented 9 years ago

I've got to_json and from_json in a branch. I'll reference this ticket when I merge with master.