guid-smasher

Smash guids: 33% smaller & URL safe


Keywords
compression, url
License
ISC
Install
npm install guid-smasher@1.0.5

Documentation

GUID Smasher

reduce the size of guids by 33% for use in URLs

API

const Smasher = require("guid-smasher");

Smasher.smash("50eaac8f-4477-4a29-bccd-43a4ae3c390c"); // "keGIzQhTiyCYPkeAHzMV3f"
Smasher.unsmash("keGIzQhTiyCYPkeAHzMV3f"); // "50eaac8f-4477-4a29-bccd-43a4ae3c390c"

that's it. Nothing complicated about it.

Errors

We will throw an Error("Not a GUID") if the guid looks poorly formatted.

Smasher.smash("Alec Baldwin"); // throws Error("Not a GUID")