
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
@zthun/webigail-url
Advanced tools
It's easy to make mistakes when making REST invocations and public API calls. Webigail solves this by using the builder pattern to construct a full URL given different parts of a URI.
Webigail is built in TypeScript and it exports both ESM and CJS modules.
# NPM
npm install @zthun/webigail-url
# Yarn
yarn add @zthun/webigail-url
import { ZUrlBuilder } from "@zthun/webigail-url";
const url = new ZUrlBuilder()
.protocol("https")
.hostname("zthunworks.com")
.subdomain("webigail")
.build();
// Outputs https://webigail.zthunworks.com
console.log(url);
There are also some utility functions for common use cases.
import { ZUrlBuilder } from "@zthun/webigail-url";
// Note: Browser only unless you're using jsdom in node. Outputs the current
// browser location with /api appended to it.
const locationUrl = new ZUrlBuilder().location(location).path("/api").build();
console.log(url);
// Url for a persons gravatar if one exists.
const avatar = new ZUrlBuilder()
.gravatar(md5("john-doe@gmail.com"), 256)
.build();
console.log(avatar);
// Outputs the existing pieces of the url.
const existingInfo = new ZUrlBuilder()
.parse("https://webigail.zthunworks.com/api/path?filter=hello")
.info();
console.log(existingInfo);
Webigail also supports building and parsing data urls as well.
import { ZDataUrlBuilder, ZMimeTypeApplication } from "@zthun/webigail-url";
const raw = require("my-data.json");
const mimeType = ZMimeTypeApplication.JSON;
const url = new ZDataUrlBuilder()
.mimeType(mimeType)
.buffer(Buffer.from(raw))
.encode("base64")
.build();
console.log(url);
4.0.4 (2025-06-22)
Note: Version bump only for package @zthun/webigail
FAQs
Url parsing and building.
The npm package @zthun/webigail-url receives a total of 13 weekly downloads. As such, @zthun/webigail-url popularity was classified as not popular.
We found that @zthun/webigail-url demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.