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