applesauce-core
Advanced tools
Comparing version
@@ -55,2 +55,2 @@ import { NostrEvent } from "nostr-tools"; | ||
/** Returns the last 64 length hex string in a URL */ | ||
export declare function getSha256FromURL(url: string | URL): string | null; | ||
export declare function getSha256FromURL(url: string | URL): string | undefined; |
@@ -98,3 +98,3 @@ import { getOrComputeCachedValue } from "./cache.js"; | ||
return hashes[hashes.length - 1][0]; | ||
return null; | ||
return; | ||
} |
@@ -0,1 +1,2 @@ | ||
export * from "./blossom.js"; | ||
export * from "./bolt11.js"; | ||
@@ -2,0 +3,0 @@ export * from "./bookmarks.js"; |
@@ -0,1 +1,2 @@ | ||
export * from "./blossom.js"; | ||
export * from "./bolt11.js"; | ||
@@ -2,0 +3,0 @@ export * from "./bookmarks.js"; |
@@ -47,4 +47,2 @@ export const convertToUrl = (url) => (url instanceof URL ? url : new URL(url)); | ||
export function normalizeURL(url) { | ||
if (typeof url === "string" && url.indexOf("://") === -1) | ||
url = "wss://" + url; | ||
let p = new URL(url); | ||
@@ -54,3 +52,4 @@ // remove any double slashes | ||
// drop the port if its not needed | ||
if ((p.port === "80" && p.protocol === "ws:") || (p.port === "443" && p.protocol === "wss:")) | ||
if ((p.port === "80" && (p.protocol === "ws:" || p.protocol === "http:")) || | ||
(p.port === "443" && (p.protocol === "wss:" || p.protocol === "https:"))) | ||
p.port = ""; | ||
@@ -57,0 +56,0 @@ // sort the query params |
@@ -0,1 +1,2 @@ | ||
export * from "./blossom.js"; | ||
export * from "./bookmarks.js"; | ||
@@ -2,0 +3,0 @@ export * from "./channels.js"; |
@@ -0,1 +1,2 @@ | ||
export * from "./blossom.js"; | ||
export * from "./bookmarks.js"; | ||
@@ -2,0 +3,0 @@ export * from "./channels.js"; |
{ | ||
"name": "applesauce-core", | ||
"version": "0.0.0-next-20250211165042", | ||
"version": "0.0.0-next-20250211174631", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "type": "module", |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
183811
1.42%151
4.14%4504
1.35%