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

iprd

v0.4.1

Published

interplanetary resource descriptions

Downloads

36

Readme

iprd

interplanetary resource descriptions

Link descriptions and data using RDF and IPLD with the rdfc-1.0 (w3.org TR) multicodec (46803).

Usage

CLI

ni:

⚡ echo '{"http://www.w3.org/1999/02/22-rdf-syntax-ns#value":42}' | iprd ni
ni:///sha-256;GoqdAH6MNX2ddN2HVm5ZdENQdDcPgxPzjJo2CRSSCDk?ct=application%2Fn-quads

⚡ echo '{"http://www.w3.org/1999/02/22-rdf-syntax-ns#value":[42]}' | iprd ni
ni:///sha-256;GoqdAH6MNX2ddN2HVm5ZdENQdDcPgxPzjJo2CRSSCDk?ct=application%2Fn-quads

web+ipfs:

⚡ echo '{"http://www.w3.org/1999/02/22-rdf-syntax-ns#value":[42]}' | iprd 'web+ipfs'
web+ipfs://bagb6qaqseanivhiap2gdk7m5otoyovtolf2egudug4hyge7trsndmciusieds

cid

⚡ echo '{"http://www.w3.org/1999/02/22-rdf-syntax-ns#value":42}' | iprd cid
bagb6qaqseanivhiap2gdk7m5otoyovtolf2egudug4hyge7trsndmciusieds

⚡ echo '{"http://www.w3.org/1999/02/22-rdf-syntax-ns#value":[42]}' | iprd cid
bagb6qaqseanivhiap2gdk7m5otoyovtolf2egudug4hyge7trsndmciusieds

car

⚡ echo '{"http://www.w3.org/1999/02/22-rdf-syntax-ns#value":42}' | iprd car
wrote car to
bagb6qaqsean7cqjqfrw3mt23udnwyqhm2744tvihfrst4qpvv7fc3nihpkagk.car

JavaScript

import iprd from 'iprd'
import assert from 'node:assert'
import { sha256 } from 'multiformats/hashes/sha2'
import { CID } from 'multiformats/cid'

const doc = {
  "@context": "https://www.w3.org/ns/activitystreams",
  "summary": "A note",
  "type": "Note",
  "content": "My dog has fleas."
}
const bytes = await iprd.encode(doc)
const cid = CID.create(...await iprd.cid(bytes, sha256))
assert.equal(cid.toString(), 'bagb6qaqsec5ogmlqpjmin5ihtpxg3qxkxdfap6cwrxa3vymwi3hghvz4gy5fe')

IPFS-LD

https://github.com/ipfs/ipfs/issues/36

The power of the semantic web is worth considering. While it hasn't really "taken off," it's TRTTD when it comes to data structuring.

@msporny created the wonderfully simple JSON-LD. Since IPFS is a tree dag structure, the JSON-LD spec (or a simplified version of it) might fit IPFS really, really well. This would give IPFS all the power of the semantic web with very little overhead.

@[email protected] 2014-09-19, https://github.com/ipfs/ipfs/issues/36

an ipfs object is a tree like json or anything else. this means that all the solutions available to JSON (inc JSON-LD, JSON-schema, and so on) are available to IPFS. moreover, it is trivial to represent RDF triples as ipfs objects. hence, you can do anything and everything.

real data is very messy. nobody in the world has succeed in forcing people to adopt a particular data typing system-- and i'm not going to sink time into those arguments. The only solution i think is viable in the long term is to make a system flexible enough for people to do whatever they want, and just rigid enough so everything interlinks.

now, the preferred way -- the way we'll suggest people do things -- is likely going to be the @context / @type from the (amazingly powerful and simple) JSON-LD.

@[email protected] 2015-05-01, https://github.com/ipfs/ipfs/issues/36

TRTTD

The Right Thing To Do