Last Updated: February 25, 2016
·
1.129K
· icholy

Javascript Constructor Overloading

This is a cool little pattern I came up with recently which lets me overload my javascript 'class' constructors. Unfortunately it is only an arity based dispatch and does not inspect the types.

https://gist.github.com/3989227/7b7f36175563caad6f374a49be96901530d9f54e