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

ssb-uri2

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssb-uri2 - npm Package Compare versions

Comparing version 2.4.0 to 2.4.1

6

lib/index.d.ts

@@ -9,5 +9,5 @@ import { BlobId, FeedId, MsgId } from 'ssb-typescript';

declare type TF = FeedTF | MessageTF | BlobTF | AddressTF | EncryptionKeyTF | IdentityTF;
export declare function fromFeedSigil(sigil: FeedId): string;
export declare function fromMessageSigil(sigil: MsgId): string;
export declare function fromBlobSigil(sigil: BlobId): string;
export declare function fromFeedSigil(sigil: FeedId): string | null;
export declare function fromMessageSigil(sigil: MsgId): string | null;
export declare function fromBlobSigil(sigil: BlobId): string | null;
export declare function fromMultiserverAddress(msaddr: string): string;

@@ -14,0 +14,0 @@ export declare function toFeedSigil(uri: string): FeedId | null;

@@ -22,2 +22,6 @@ "use strict";

function fromFeedSigil(sigil) {
if (typeof sigil !== 'string')
return null;
if (!sigil.startsWith('@'))
return null;
const data = Base64.unsafeToSafe(sigil.slice(1, -8));

@@ -28,2 +32,6 @@ return `ssb:feed/classic/${data}`;

function fromMessageSigil(sigil) {
if (typeof sigil !== 'string')
return null;
if (!sigil.startsWith('%'))
return null;
const data = Base64.unsafeToSafe(sigil.slice(1, -7));

@@ -34,2 +42,6 @@ return `ssb:message/classic/${data}`;

function fromBlobSigil(sigil) {
if (typeof sigil !== 'string')
return null;
if (!sigil.startsWith('&'))
return null;
const data = Base64.unsafeToSafe(sigil.slice(1, -7));

@@ -36,0 +48,0 @@ return `ssb:blob/classic/${data}`;

{
"name": "ssb-uri2",
"version": "2.4.0",
"version": "2.4.1",
"description": "Utilities for recognizing and converting SSB URIs",

@@ -5,0 +5,0 @@ "repository": {

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