import { logMessage } from "https://esm.town/v/willthereader/logMessage";
export const constructReadTangleUrl = (() => {
return (post_id) => {
const baseUrl = new URL("https://www.readtangle.com/members/api/comments/?filter=post_id%3A");
let commentUrl = "";
if (typeof post_id === "string") {
commentUrl = `${baseUrl}${post_id}`;
} else {
logMessage("Warning: post_id should be a string");
}
return commentUrl;
};
})();