summaryrefslogtreecommitdiff
path: root/node_modules/@11ty/eleventy-utils/src/Url.js
blob: 7f314efb2a816ab6f1121a91877f6439c03b48b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
function base64UrlSafe(hashString = "") {
	return hashString.replace(/[=\+\/]/g, function(match) {
		if(match === "=") {
			return "";
		}
		if(match === "+") {
			return "-";
		}
		return "_";
	});
}

module.exports = { base64UrlSafe };