function wrappy(n,r){if(n&&r)return wrappy(n)(r);if("function"!=typeof n)throw new TypeError("need wrapper function");return Object.keys(n).forEach(function(r){e[r]=n[r]}),e;function e(){for(var r=new Array(arguments.length),e=0;e<r.length;e++)r[e]=arguments[e];var t=n.apply(this,r),o=r[r.length-1];return"function"==typeof t&&t!==o&&Object.keys(o).forEach(function(n){t[n]=o[n]}),t}}module.exports=wrappy;