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

@internetarchive/dweb-objects

v0.1.24

Published

Internet Archive Decentralized Web Transports Library

Downloads

18

Readme

DwebObjects

Object library for higher level Decentralized Web concepts. Builds on dweb-transports.

Background

This library is part of a general project at the Internet Archive (archive.org) to support the decentralized web.

Goals

  • to allow a API that can be used to build functionality in the Dweb easier.

Installation and usage in the Browser

  • Install npm & node
  • Clone this repo and cd to it.
  • npm build will create dist/dweb-transports-bundle and dweb-objects-bundle.js
  • npm setuphttp will setup some links we haven't persuaded webpack to do!

Running the examples in the Browser

The examples can run either from the dweb.me/examples server, or once the source is checked out, locally from your file system.

By default each of these examples runs multiple transports, and is smart if it cannot connect to one or the other.

Browser Support: This should work on Chrome and Firefox (Safari doesn't support many newer features but appears to work),

Transport choice: You can deselect transports by clicking the Green indicator on an example. To prevent it connecting in the firstplace, you can supply paused=HTTP or paused=IPFS or paused=WEBTORRENT or paused=YJS to the url.

Verbosity: You can get debugging output by setting localStorage.debug=("dweb-objects:* dweb-transports:*") in your javascript console, you should only have to set this once.

Adding to a HTML application

  • Add to your <HEAD>
<SCRIPT type="text/javascript" src="dweb-transports-bundle.js"></SCRIPT>
<SCRIPT type="text/javascript" src="dweb-objects-bundle.js"></SCRIPT>

See the examples in the dist directory of this repo for some example code.

See API.md for the detailed API.

Node Installation

  • Clone this repo.

Incorporation in a Node application

Add to package.json in the dependencies section.

"@internetarchive/dweb-transports": "latest",
"@internetarchive/dweb-objects": "latest",
  • npm install will then install dweb-objects and dweb-transports which currently includes IPFS, WebTorrent, Gun, YJS

In your application javascript, in this order.

const DwebTransports = require('@internetarchive/dweb-transport') #adds the transports
const DwebObjects = require('@internetarchive/dweb-objects;)      #adds the object library
  • TODO writeup how to require only some of the transports.
  • Then see usage API below

See also

See Dweb document index for a list of the repos that make up the Internet Archive's Dweb project, and an index of other documents.

Release Notes

  • 0.1.23 2019-06-18 Local root tree instead of fetching with contenthash
  • 0.1.22 Include Wolk changes to names