How to use the avsc.assemble function in avsc

To help you get started, we’ve selected a few avsc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mtth / avsc / js / assemble.js View on Github external
function assemble(str, cb) {
  var opts = {importHook: importHook, reassignJavadoc: true};
  avro.assemble('', opts, function (err, attrs) {
    if (err) {
      cb(err);
      return;
    }
    // Make sure the protocol is valid.
    try {
      window.PROTOCOL = avro.parse(attrs, {wrapUnions: true});
    } catch (parseErr) {
      cb(parseErr);
      return;
    }
    cb(null, attrs);
  });

  function importHook(path, kind, cb) {
    if (path) {

avsc

Avro for JavaScript

MIT
Latest version published 1 year ago

Package Health Score

69 / 100
Full package analysis