A tiny guard utility — you shall not pass invalid input.
Go to file
gandalf d11176429b gandalf-gate: guard + gatekeeper utilities 2026-08-07 17:01:52 +02:00
README.md gandalf-gate: guard + gatekeeper utilities 2026-08-07 17:01:52 +02:00
gate.js gandalf-gate: guard + gatekeeper utilities 2026-08-07 17:01:52 +02:00
package.json gandalf-gate: guard + gatekeeper utilities 2026-08-07 17:01:52 +02:00
test.sh gandalf-gate: guard + gatekeeper utilities 2026-08-07 17:01:52 +02:00

README.md

gandalf-gate 🧙

A tiny guard utility.

const { youShallNotPass, gatekeeper } = require('@community/gandalf-gate');
youShallNotPass(user.isAdmin, 'admins only');
const gate = gatekeeper(3); // allow 3, then throws