0.5.5 • Published 5 years ago

ext-rdflib v0.5.5

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

ext-rdflib.js Build Status

An experimental blend of rdflib.js and rdf-ext.

Description

ext-rdflib.js decorates rdf-ext to be somehow compatible with rdflib.js. The goal is not full compatibility (this would defeat the goal of getting rid of some rdflib.js peculiarities) but to make using rdf-ext easier expecially to those who know rdflib.js.

Also I add features as I need them and you're invited to do the same. The design principle is to add features that are compatible with the rdflib.js API without breaking the rdf-ext API.

Usage

With node.js:

const $rdf = require("ext-rdflib");

In the browser:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jsonld/1.0.0/jsonld.min.js"></script>
<script type="text/javascript" src="https://retog.github.io/ext-rdflib/latest/rdf.js"></script>

The first line is optional and only required if JSON-LD support is required. The ext-rdflib URI always points to the latest version, replace latest with a specific version number to avoid potentially breaking updates, e.g. https://retog.github.io/ext-rdflib/0.5.0/rdf.js

The $rdf variable will provide all method of rdf-ext plus some methods to mimick the rdflib.js API.

Features

Parsing in all formats supported by rdflib.js is supported. However the parse method must be called asynchronously:

parse(content, store, base, mediaType, (error, store) => {
    //do something
})

Note that support for RDFa and RDF/XML have has not been added to rdf-ext as it should be done, they are only supported when calling the rdflib.js-style method as this code has been taken from rdflib.js virtually without modification.

Size

The browser-distribution of ext-rdflib.js that inludes rdf-ext and the required parsers is currently 592 KB which is significantly smaller than rdflib.js which is 1.64 MB. Obviously the size will grow as more features are added.

0.5.5

5 years ago

0.5.4

5 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago