12345678910111213141516171819 |
- module.exports = SafeParse
-
- function SafeParse(obj, reviver, callback) {
- if (arguments.length === 2) {
- callback = reviver
- reviver = null
- }
-
- var json
-
- try {
- json = JSON.parse(obj, reviver)
- } catch (err) {
- return callback(err)
- }
-
- callback(null, json)
- }
|