Skip to content Skip to sidebar Skip to footer
Show HN: Babel plugin that enhances JavaScript functions with custom attributes by ghoolishmonkey

Show HN: Babel plugin that enhances JavaScript functions with custom attributes by ghoolishmonkey

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

Read more

In the Shadows of Innovation”

© 2025 HackTech.info. All Rights Reserved.

In the Shadows of Innovation”

© 2025 HackTech.info. All Rights Reserved.

Sign Up to Our Newsletter

Be the first to know the latest updates

Whoops, you're not connected to Mailchimp. You need to enter a valid Mailchimp API key.