build-boiler
Version:
Build Boilerplate using Webpack, Eslint, Assemble, Nunjucks, and BrowserSync
23 lines (19 loc) • 766 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (fn, ctx) {
return function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return function (cb) {
fn.apply(ctx || null, args.length ? [].concat(args, [cb]) : [cb]);
};
};
};
module.exports = exports['default']; /**
* Thunk function for a function with last argument as a `cb` that is called with only 1 or less arguments
* @param {Function} fn
* @return {Function} first function to be called
*/