1
2
3
4
5
import { Buffer } from "node:buffer";
export let basicAuthorization = (username: string, password: string) => ({
Authorization: "Basic " + Buffer.from(username + ":" + password).toString("base64"),
});
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023