Hacker News new | past | comments | ask | show | jobs | submit login

I used a similar pattern once, except _generically_ as follows:

    function Breakfast(my, args) {
      if (!(this instanceof arguments.callee)) return new arguments.callee(arguments);
      if (Object.prototype.toString.call(arguments[0]) === '[object Arguments]') arguments.callee.apply(this, args);
    }



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: