1.0.0 • Published 4 years ago

webrun-plugin-dat v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

webrun-plugin-dat

A plugin for webrun that enables support for the Dat protocol.

How to use

# Install webrun
npm i -g webrun

# Install the Dat plugin
npm i -g webrun-plugin-dat

# Run a module off of Dat
webrun dat://rangermauve.hashbase.io/example.js

This plugin also adds the window.DatArchive global to all scripts which enables you to create and load archives. Check out the API here.

If you're loading a script off of Dat, you can access the window.experimental.datPeers API if you've enabled it for that archive. This enables you to send messages to other processes that are replicating that archive.