Comparing version 2.4.0 to 2.4.1
@@ -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": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31207
414