Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@synonymdev/feeds

Package Overview
Dependencies
Maintainers
8
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@synonymdev/feeds - npm Package Compare versions

Comparing version 2.1.1 to 3.0.0

14

lib/writer.js

@@ -1,2 +0,1 @@

const b4a = require('b4a')
const SlashURL = require('@synonymdev/slashtags-url')

@@ -124,7 +123,8 @@

static encode (value) {
if (b4a.isBuffer(value)) return value
try {
value = JSON.stringify(value)
} catch {
}
try {
return b4a.from(JSON.stringify(value))
} catch { }
return Buffer.from(value)
}

@@ -138,4 +138,6 @@

static decode (value) {
const string = Buffer.from(value).toString()
try {
return JSON.parse(b4a.toString(value))
return JSON.parse(string)
} catch { }

@@ -142,0 +144,0 @@

{
"name": "@synonymdev/feeds",
"version": "2.1.1",
"version": "3.0.0",
"main": "index.js",

@@ -20,3 +20,3 @@ "types": "types/index.d.ts",

"dependencies": {
"b4a": "^1.5.3"
"@synonymdev/slashtags-url": "^1.0.1"
},

@@ -23,0 +23,0 @@ "devDependencies": {

# Slashtags Feeds
A library for creating and managing feeds using Hyperdrive and Hyperswarm.
A library for creating and managing feeds using the web-relay

@@ -5,0 +5,0 @@ ## Usage

@@ -56,3 +56,3 @@ export = Reader;

*/
getField<T>(name: string, decode?: (buf: Uint8Array) => T): Promise<T>;
getField<T>(name: string, decode?: (buf: Uint8Array) => T): Promise<T | null>;
/**

@@ -69,3 +69,3 @@ * Subscribe to a field

*/
subscribe<T_1>(name: string, onupdate?: (value: any) => any, decode?: (buf: Uint8Array) => T_1): () => void;
subscribe<T>(name: string, onupdate?: (value: any) => any, decode?: (buf: Uint8Array) => T): () => void;
/**

@@ -80,5 +80,5 @@ * @param {string} name

}
type Config = import('./writer').Config;
import Feed = require("./writer.js");
type WebRelayClient = import('@synonymdev/web-relay/types/lib/client/index');
type WebRelayClient = import("@synonymdev/web-relay/types/lib/client/index");
type Config = import("./writer").Config;
//# sourceMappingURL=reader.d.ts.map

@@ -73,4 +73,4 @@ export = Feed;

}
type WebRelayClient = import("@synonymdev/web-relay/types/lib/client/index");
type Config = {
[key: string]: any;
name: string;

@@ -83,4 +83,3 @@ description?: string;

version?: string;
fields?: {
[key: string]: any;
fields?: Array<{
name: string;

@@ -92,5 +91,6 @@ description?: string;

};
}[];
[key: string]: any;
}>;
[key: string]: any;
};
type WebRelayClient = import('@synonymdev/web-relay/types/lib/client/index');
//# sourceMappingURL=writer.d.ts.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc