index.js 791 B

123456789101112131415
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.DatabaseError = exports.serialize = exports.parse = void 0;
  4. const messages_1 = require("./messages");
  5. Object.defineProperty(exports, "DatabaseError", { enumerable: true, get: function () { return messages_1.DatabaseError; } });
  6. const serializer_1 = require("./serializer");
  7. Object.defineProperty(exports, "serialize", { enumerable: true, get: function () { return serializer_1.serialize; } });
  8. const parser_1 = require("./parser");
  9. function parse(stream, callback) {
  10. const parser = new parser_1.Parser();
  11. stream.on('data', (buffer) => parser.parse(buffer, callback));
  12. return new Promise((resolve) => stream.on('end', () => resolve()));
  13. }
  14. exports.parse = parse;
  15. //# sourceMappingURL=index.js.map