UNPKG

data-provider-temporary

Version:

Library that helps with server-to-client synchronization of data

13 lines (10 loc) 245 B
'use strict'; var parseJson = require('parse-json'); module.exports = function (json, filepath) { try { return parseJson(json); } catch (err) { err.message = 'JSON Error in ' + filepath + ':\n' + err.message; throw err; } };