UNPKG

node-heremaps

Version:
23 lines (19 loc) 392 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (callback) { if (typeof callback !== 'function') { return false; } return function (error, jsonString) { if (error) { return callback(error); } try { callback(error, JSON.parse(jsonString)); } catch (e) { return callback(e); } }; };