npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ext-rdflib

v0.5.5

Published

rdflib.js on top of rdf-ext

Downloads

24

Readme

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.