How to use the moddle.Moddle function in moddle

To help you get started, we’ve selected a few moddle 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 bpmn-io / moddle-xml / test / helper.js View on Github external
var packages = map(packageNames, function(f) {
      var pkg = cache[f];
      var file = base + f + '.json';

      if (!pkg) {
        try {
          pkg = cache[f] = JSON.parse(readFile(base + f + '.json'));
        } catch (e) {
          throw new Error('[Helper] failed to parse <' + file + '> as JSON: ' + e.message);
        }
      }

      return pkg;
    });

    return new Moddle(packages);
  }

moddle

A library for importing meta-model based file formats into JS

MIT
Latest version published 8 months ago

Package Health Score

74 / 100
Full package analysis