SkillAgentSearch skills...

JSDecorators

Python like decorators in Javascript with pseudo operator overloading.

Install / Use

/learn @dzautner/JSDecorators
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Python like decorators in Javascript with pseudo operator overloading.

First thing, I would like to state that this is just a small experiment and should not be used for anything more than satisfying one's curiosity.

The script overwrites Function.prototype.valueOf. Something that shouldn't be done in any case.

This is an experiment continuing my implementation of nix like pipe syntax for JavaScript.

This small experiment allows you to use decorators with cool syntax like this:

+memoize
+function longCalculation() {
	...
}


+route("/user")
+function user() {
	
} 

You can read a bit more about the concept of fake operator overloading using valueOf on my other JS experiment: https://github.com/dzautner/jsPipe

View on GitHub
GitHub Stars54
CategoryDevelopment
Updated1y ago
Forks0

Languages

JavaScript

Security Score

65/100

Audited on Feb 11, 2025

No findings