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

lov-ns

v2.0.3

Published

Recommended RDF vocabularies for Linked Open Data.

Downloads

3,267

Readme

Linked Open Vocabularies namespaces

Namespace URIs and common prefixes for recommended RDF vocabularies derived from the Open Knowledge Foundation's Linked Open Vocabularies (LOV) collection.

This library is conceptually similar to Kjetil Kjernsmo's RDF::NS::Curated package for Perl, as well as the Website http://prefix.cc/.

Use

Requiring this module simply returns an object containing key-value pairs for each entry in the LOV collection. The keys are the prefix by which this vocabulary is commonly known (i.e. in the Turtle RDF serialization). The value will be the URL of the namespace resource.

const lov = require('lov-ns')

const namespaces = {
  oa: lov.oa,
  dce: lov.dce,
  foaf: lov.foaf
}

If you do not want to pull in the entire LOV list to use only a few vocabularies, you can require each individually:

const namespaces = {
  oa: require('lov-ns/oa')
  dce: require('lov-ns/dce'),
  foaf: require('lov-ns/foaf'),
}

This package also comes with a command line program, lov-ns, which will expand the prefix of a vocabulary contained in the LOV collection. For example, running lov-ns oa will print http://www.w3.org/ns/oa# to stdout.

Following semantic versioning, breaking changes in the dataset (i.e. a change in a namespace's metadata) will result in a major version bump.

Updating

To update the dataset, run npm run update-lov. This will perform three steps:

  1. Fetch the dataset and create derived namspace files (the index.js and data.json files in the child directories)

  2. If there have been any changes, these will be commited with an automatic message

  3. If there were any changes committed, the package version will be updated. If there were nothing but additions in the commit, this will be a minor version bump. Otherwise, it will be a major version bump.