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

picorepo

v2.2.5

Published

Persistent efficient binary block storage for picofeeds

Downloads

116

Readme

code style | standard

 _ . _ _ ._   _  _
|_)|(_(_)|(/_|_)(_)
|            |

Block storage

The repo is part of picostack

This is a low-level blockstore for picofeeds that stores consistent chains using a fast access scheme.

Discord

Use

$ npm install picorepo levelup memdown
import { Repo } from 'picorepo'
import { Feed } from 'picofeed'

const db = new MemoryLevel('pico', {
  keyEncoding: 'buffer',
  valueEncoding: 'buffer'
})

const repo = new Repo(db)

// Generate an crypto identity consisting of a public and secret key
const { pk, sk } = Feed.signPair()

const feed = new PicoFeed()
feed.append('Alpha', sk)
feed.append('Beta', sk)
feed.append('Gamma', sk)

const numberAccepted = await repo.merge(feed) // => 3 blocks

// Retrieve feed by Author
const alt1 = await repo.loadHead(pk)

// Retrive feed by block-signature
const alt2 = await repo.resolveFeed(feed.first.sig)

Graphviz support

To avoid brain-leakage I've added a tool that renders dot-files to easier inspect which blocks are stored and where their tags are located.

import { writeFileSync } from 'node:fs'
import { inspect } from 'picorepo/dot'

// generate graph as string
const dotString = await inspect(repo)

// dump as file
writeFileSync('repo.dot', dotString)
# use xdot to view it
xdot repo.dot

# or render as png
dot -Gcenter="true" -Gsize="8,8\!" -Gdpi=100 -Kdot -Tpng -O *.dot

dag

Changelog

2.0.0 2023-04-30

  • ported to picofeed v4

1.3.1 2022-08-02

  • added experimental mode 'allowDetached'

1.3.0 Eons later

  • added optional graphviz/dot generator
  • added index for chain-id
  • added async repo.listFeeds()
  • changed repo.writeBlock() to use batch ops.

1.0.0 first release

Contributing

By making a pull request, you agree to release your modifications under the license stated in the next section.

Only changesets by human contributors will be accepted.

License

AGPL-3.0-or-later

2021  Tony Ivanov