
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@synonymdev/feeds
Advanced tools
A library for creating and managing feeds using Hyperdrive and Hyperswarm.
A library for creating and managing feeds using Hyperdrive and Hyperswarm.
Initiate the library.
const feeds = new Feeds();
const feedID = feeds.randomID();
await feeds.update(feedID, 'balance', 1000);
const feeds = new Feeds(storage, [opts])
Create a Feeds instance.
storage
Storage directory to save feeds at. Defaults to os.homedir() + '/.slashtags-feeds/'
opts
includes:
metadata
: an object of metadata files to be saved along the data. example { schema: schema }
feeds.randomID()
Generate a random string id to be used as the feedID.
await feeds.feed(feedID)
Returns the feed key
and encryptionKey
for a given feed, identified by any serializable id.
It awaits until the feed is announced on the swarm.
await feeds.update(feedID, key, value)
Updates a feed. key
is a string, and value
is a serializable JSON object.
await feeds.get(feedID, key)
Returns a value from a feed.
await feeds.close()
Gracefully closing feeds and freeing IO resources.
await feeds.destroy(feedID)
Destroys all stored data for the feed.
As of this first version, Slashtags feeds is a directory on top of Hyperdrive with the current structure:
├── feed
│ ├── foo
│ ├── bar
└── slashfeed.json
Where slashfeed.json
defines the name
, image
and other future metadata about the feed.
And feed
directory contains the feed files, where each file represents a key value pair.
FAQs
A library for creating and managing feeds using the web-relay
We found that @synonymdev/feeds demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.