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

hypercorder

v0.0.1

Published

many-to-one feed reducing data structure

Downloads

2

Readme

Build Status JavaScript Style Guide standard-readme compliant

hypercorder

Version: alpha-0.0.1

Hypercorder is a datastructure with a cryptographic signing scheme capable of embedding entries from foreign feeds in a publicly verifiable way.

Simply put: Many to one feed encoder.

Introduction

Hypercorder extends hypercore and works exactly like a regular feed with the exception that it has 2 modes of replication.

  • feed.replicate(initiator, opts) replicates as usual, won't be mentioned here further.
  • feed.exchange(initiator, opts) creates a hyperplexed replication stream capable of accepting 'suggestions' on new content from other peers.

Suggestions come encoded as a Statement - each statment contains cryptographic proof of it's origin and integrity.

When participating in a "RecorderTopic" as a moderator, your goal is to collect valid statements.

You control which Statments are recorded by providing a filter function. For optimal performance, each peer should use identical filter functions - forming a topic-wide consensus. Deviations in consensus are perfectly acceptable but come at the cost of reduced network throughput.

When participating in a "RecorderTopic" as a voice, your goal is to publish your own statements and replicate data until either your statements are recorded or the main feed finalized.

In order for your statement to be recorded it has to reach a moderator and pass that individual's filter function.

Anyone with access to the "RecorderTopic" has uncensored access to content.

My hypothesis is that if each peer forwards only locally validated statements: A self-curating network should form - your voice should be heard as long as there is anyone willing to listen.

Install

 yarn add hypercorder
 # or
 npm i hypercorder

Usage

const Recorder = require('hypercorder')

// Define a statement validation function for the network
// a statement failing the validation test will not be relayed
const filter = stmt => {
  const message = stmt.data.toString('utf8')
  if (message.match(/bad content/)) {
    return false
  } else {
    return true
  }
}

// Initialize a new hypercorder
const mainFeed = new Recorder(storage, { filter })
await mainFeed.ready()

// TODO: show how to simultaneously join 2 topics and
// differentiate between the two.

Contributing

Ideas and contributions to the project are welcome. You must follow this guideline.

License

GNU AGPLv3 © Tony Ivanov