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
Written by ilia choly
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Javascript
Authors
Related Tags
#javascript
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#