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 🙏

© 2026 – Pkg Stats / Ryan Hefner

rdf-query

v1.0.0

Published

A module to interact with solid apps

Readme

What is this?

Initially this library is designed to make RDF queries to Solid PODs, but it can be easily extended with the methods that it already has. I encourage you to participate on its growth and spread. Let's make rdf-query the main RDF library and unify all RDF related staff in it!

Usage

let rdfq = require("rdf-query");

Or

import {...} from "rdf-query";

Reference

| Method | Description | | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- | | getName(profile) | Returns the name of the profile passed as a parameter | | getImage(profile) | Returns the URI of the image of the specified profile | | getFriends(profile) | Returns an array of URIs, that represent the list of friends of the profile specified as a parameter | | getInfoFromProfile(profile) | Returns the name, friends (as URIs), and image (as URI) from the specified profile | | getMultipleValuesFromFoaf(profile, field) | Returns an array of values from the foaf namespace | | getSingleValueFromFoaf(profile, field) | Returns an object containing the value from the foaf namespace | | getSingleValueFromVcard(profile, field) | Returns an object containing the value from the vcard namespace | | getMultipleValuesFromNamespace(profile, field, ns) | Returns an array containing objects with the information of the field you requested, from the specified namespace | | getSingleValueFromNamespace(profile, field, ns) | Returns an object containing the value of the field you requested, from the specified namespace |

Example usage

Getting the name of a user

This would be the code to get the name of a user, given his/her webId

const rdf = require("rdf-query");

rdf
  .getName("https://timbl.solid.community/profile/card#me")
  .then(name => console.log(name.value));

Which will give us:

"Tim Berners-Lee (solid.community)";

Getting friends of a user

To get the URIs of the friends of a user, we will use this code:

rdf
  .getFriends("https://timbl.solid.community/profile/card#me")
  .then(friends => {
    friends.map(friend => {
      console.log(friend.object.value);
    });
  });

Which returns:

"http://www.w3.org/People/Berners-Lee/card#i";
"https://angelo.veltens.org/profile/card#me";
"https://gaia.solid.community/";
"https://jollyorc.solid.community/profile/card#me";
"https://melvin.solid.community/profile/card#me";
"https://nada.solid.community/profile/card#me";
"https://spoggy.solid.community/profile/card#me";