helene
Version:
Real-time Web Apps for Node.js
16 lines • 432 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.parse = void 0;
const index_1 = require("./index");
/**
* @todo Support buffers.
*
* @param item
*/
const parse = item => {
if (typeof item !== 'string')
throw new Error('EJSON.parse argument should be a string');
return index_1.EJSON.fromJSONValue(JSON.parse(item));
};
exports.parse = parse;
//# sourceMappingURL=parse.js.map