overl8d
Overload your function easi-fastest way
Installion
npm install overl8d
Idea
Idea of overl8d
is simple. Put overl8d function's parameters object types how many do you want, and put unnamed callback function in it (it really must be unnamed), overl8d makes calculations for you and generates new function. if you want to overload 0 (zero) parameter, just do not put any type... look down pls.
; // writes hi in console
You can use own types. But make sure you put name of them!
{ this { console; return 0; }} var myClass = ;myClass; // writes "hello" returns 0
Using in nodejs
var overl8d = ; /** @construct */ { thisx = x; thisy = y;} var Add = ; var size = 1 3;var size2 = 4 5;; // Size {x: 5, y: 8}; // Size {x: 5, y: 8}
using it on browser without amd
<!-- load from nodemodules folder -->
after load
var Add = ;
using it on browser with amd
;