A Babel plugin that enhances JavaScript functions with custom attributes, providing additional metadata and annotations. Example Input $attr(middlewares([‘auth’]), can([‘create’])) function routeHandler(req, res) { // some code } Output function routeHandler(req, res) { // some code } (function () { const attributes = new Map(); attributes.set(middlewares, middlewares([‘auth’])); attributes.set(can, can([‘create’])); routeHandler.__attributes__ = attributes; })(); Installation You can
