How to use levelgraph - 2 common examples

To help you get started, we’ve selected a few levelgraph 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 scienceai / mesh-tree / src / index.js View on Github external
constructor(config) {
    config = config || {};

    let DB;
    if (config.level) {
      DB = config.level;
    } else {
      let dbPath = config.dbPath || process.env['PATH_TO_MESH_DB'] || 'dbtest';
      DB = level(dbPath);
    }

    this.db = levelgraphN3(levelgraph(DB));
    this.dbSearch = Promise.promisify(this.db.search, {multiArgs: false});

  }
github ewnd9 / media-center / src / services / recommendations-service.js View on Github external
RecommendationsService.prototype.initDb = function() {
  this.graphLevel = level(this.graphPath);
  this.graph = levelgraph(this.graphLevel);

  this.graphPut = pify(this.graph.put.bind(this.graph));
  this.graphSearch = pify(this.graph.search.bind(this.graph));
};

levelgraph

A graph database for Node.js and the browser built on top of LevelUp

MIT
Latest version published 7 months ago

Package Health Score

70 / 100
Full package analysis

Popular levelgraph functions