Projects

Los-token

Los-token is a small npm package, written in TypeScript, that uses the BLAKE2 suite of cryptographic functions to provide bare-bones session validation. Its most salient use case is in applications where egress data comes at a premium and every byte sent over the wire counts; in this case, using JWT is often overkill for basic validation. By contrast, Los prioritizes compactness, sacrificing the advanced functionality and customizability of JWTs to offer simple code, short runtimes, and small token sizes.

Los contains a custom base-89 text encoder that condenses token data as much as possible while still adhering to the IETF cookie standard (RFC 6265). The package also features thorough unit testing with Jest, both for Los itself, as well as for each of the base-89 encoding and decoding functions.

You can check out the repository by clicking here.