Giter VIP home page Giter VIP logo

ext-rdflib's Introduction

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 type="text/javascript" src="https://retog.github.io/ext-rdflib/latest/rdf.js"></script>

The above URI always point 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.0.2/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.

ext-rdflib's People

Contributors

retog avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.