@@ -6,32 +6,61 @@ LevelGraph-N3
66[ ![ Build Status] ( https://travis-ci.org/mcollina/levelgraph-n3.png )] ( https://travis-ci.org/mcollina/levelgraph-n3 )
77[ ![ Coverage Status] ( https://coveralls.io/repos/mcollina/levelgraph-n3/badge.png )] ( https://coveralls.io/r/mcollina/levelgraph-n3 )
88[ ![ Dependency Status] ( https://david-dm.org/mcollina/levelgraph-n3.png?theme=shields.io )] ( https://david-dm.org/mcollina/levelgraph-n3 )
9+ [ ![ Sauce Labs
10+ Tests] ( https://saucelabs.com/browser-matrix/levelgraph-n3.svg )] ( https://saucelabs.com/u/levelgraph-n3 )
911
1012__ LevelGraph-N3__ is a plugin for
1113[ LevelGraph] ( http://github.com/mcollina/levelgraph ) that adds the
1214ability to store, fetch and process N3 and turtle files.
1315
14- ## Install on Node.js
16+ ## Install
1517
18+ ### Node.js
19+
20+ Adding support for N3 to LevelGraph is easy:
1621``` shell
1722$ npm install levelgraph levelgraph-n3 --save
1823```
24+ Then in your code:
25+ ``` js
26+ var levelgraph = require (' levelgraph' ),
27+ levelgraphN3 = require (' levelgraph-n3' ),
28+ db = levelgraphN3 (levelgraph (' yourdb' ));
29+ ```
30+
1931
2032At the moment it requires node v0.10.x, but the port to node v0.8.x
2133should be straighforward.
2234If you need it, just open a pull request.
2335
24- ## Install in the Browser
36+ ### Browser
37+
38+ If you use [ browserify] ( http://browserify.org/ ) you can use this package
39+ in a browser just as in node.js. Please also take a look at [ Browserify
40+ section in LevelGraph package] ( https://github.com/mcollina/levelgraph#browserify )
2541
26- TO BE DONE!
42+ You can also use standalone browserified version from ` ./build `
43+ directory or use [ bower] ( http://bower.io )
44+
45+ ``` shell
46+ $ bower install levelgraph-n3 --save
47+ ```
48+ It will also install its dependency levelgraph! Now you can simply:
49+
50+ ``` html
51+ <script src =" bower_components/levelgraph/build/levelgraph.js" ></script >
52+ <script src =" bower_components/levelgraph-n3/build/levelgraph-n3.js" ></script >
53+ <script >
54+ var db = levelgraphN3 (levelgraph (' yourdb' ));
55+ </script >
56+ ```
2757
2858## Usage
2959
30- Adding support for N3 to LevelGraph is easy:
60+ We assume in following examples that you created database as explained
61+ above!
3162``` js
32- var levelgraph = require (" levelgraph" ),
33- n3 = require (" levelgraph-n3" ),
34- db = n3 (levelgraph (" yourdb" ));
63+ var db = levelgraphN3 (levelgraph (" yourdb" ));
3564```
3665
3766### Importing n3 files
0 commit comments