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

nostr-ld

v0.0.1

Published

nostr-ld

Downloads

2

Readme



GitHub license npm npm Github Stars

Nostr-LD

Nostr-LD is a powerful and extensible library for transforming Nostr events and profiles into JSON-LD format. By leveraging JSON-LD, a W3C standard, Nostr-LD allows Nostr data to be interpreted and used by a wide range of tools and applications, enhancing interoperability and integration across the web.

Table of Contents

Features

  • Event-LD: Transforms Nostr events into JSON-LD format.
  • Profile-LD: Transforms Nostr profiles into JSON-LD format.
  • Easy extensibility to support additional Nostr types in the future.
  • Promotes decentralization and domain independence.

Installation

npm install nostr-ld

Usage

Event-LD

import { eventld } from 'nostr-ld';

const event = '{...}'; // Your Nostr event here.
const jsonLD = eventld(event);

console.log(JSON.stringify(jsonLD, null, 2));

Profile-LD

import { profileld } from 'nostr-ld';

const user = '...'; // Your user pubkey here.
const mergedData = '{...}'; // Merged user data.
const jsonLD = profileld(user, mergedData);

console.log(JSON.stringify(jsonLD, null, 2));

Why Nostr-LD?

The adoption of JSON-LD for Nostr events and profiles brings several benefits:

  • Interoperability: JSON-LD is a W3C standard widely adopted, which enables data from Nostr to be easily consumed by a broad range of tools and applications.
  • Decentralization: By storing data in a decentralized manner, in the /.well-known/nostr/ directory, Nostr-LD helps to maintain the decentralized nature of Nostr and doesn't put pressure on individual relays.
  • Semantic Web: JSON-LD is a key technology in the Semantic Web, enabling Nostr data to be part of the larger web of data.

Contributing

We welcome contributions! Please see our contributing guide for more details.

License

MIT


By embracing standards like JSON-LD, Nostr-LD aims to keep Nostr open, interoperable, and ready for the future of the web. We hope you find this library useful in your Nostr-related projects.

License

  • MIT