Front end of the Slack clone application.

12345678910111213141516171819
  1. module.exports = SafeParse
  2. function SafeParse(obj, reviver, callback) {
  3. if (arguments.length === 2) {
  4. callback = reviver
  5. reviver = null
  6. }
  7. var json
  8. try {
  9. json = JSON.parse(obj, reviver)
  10. } catch (err) {
  11. return callback(err)
  12. }
  13. callback(null, json)
  14. }