Skip to content
JS RDF store with SPARQL support
JavaScript Other
Find file
Pull request Compare This branch is 7 commits ahead, 148 commits behind master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
bin
browsertests
data
dist
doc
frontend
lubm
src
README.md
closure-compiler.jar
configuration.rb
load_data.js
make.rb
yuicompressor-2.4.6.jar

README.md

micrograph.js

Graph data layer for client JS applications.

var mg = require('micrograph');

mg.create(function(g) {
    g.save([{$type: 'Person',
             name: 'Ludwig',
             surname: 'Wittgenstein',
             birthplace: 'Wien',
             author: [{$type: 'Book',
                       title: 'Tractatus Logico-Philosophicus'},
                      {$type: 'Book',
                       title: 'Philosophical Investigations'}]},
            {$type: 'Person',
             name: 'Karl',
             surname: 'Popper',
             author: {$type: 'Book',
                  title: 'The Open Society and its Enemies'}}]).
        where({author$in: {surname: 'Wittgenstein'}}).
        removeNodes(function(removed) {
                assert(removed === 2);
        }).
        where({author$in: {}}).
        all(function(authored){
            assert(authored.length === 1);
            assert(authored[0].title === 'The Open Society and its Enemies');
            assert(authored[0].author$in.surname === "Popper");     
        });
    });
Something went wrong with that request. Please try again.