diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-11-13 21:53:45 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-11-13 21:53:45 +0100 |
commit | 18c96ab6926658d6707f1f3be935078f1cb08411 (patch) | |
tree | 418195a292ce8811679d4c2b1cb7bb0316669d62 /node_modules/async/compose.js | |
parent | 9657e01be14fa5baa4067da65aff94faf6c973e0 (diff) |
node modules
Diffstat (limited to 'node_modules/async/compose.js')
-rw-r--r-- | node_modules/async/compose.js | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/node_modules/async/compose.js b/node_modules/async/compose.js deleted file mode 100644 index 65b26bbde..000000000 --- a/node_modules/async/compose.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _seq = require('./seq'); - -var _seq2 = _interopRequireDefault(_seq); - -var _baseRest = require('lodash/_baseRest'); - -var _baseRest2 = _interopRequireDefault(_baseRest); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Creates a function which is a composition of the passed asynchronous - * functions. Each function consumes the return value of the function that - * follows. Composing functions `f()`, `g()`, and `h()` would produce the result - * of `f(g(h()))`, only this version uses callbacks to obtain the return values. - * - * Each function is executed with the `this` binding of the composed function. - * - * @name compose - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {...Function} functions - the asynchronous functions to compose - * @returns {Function} an asynchronous function that is the composed - * asynchronous `functions` - * @example - * - * function add1(n, callback) { - * setTimeout(function () { - * callback(null, n + 1); - * }, 10); - * } - * - * function mul3(n, callback) { - * setTimeout(function () { - * callback(null, n * 3); - * }, 10); - * } - * - * var add1mul3 = async.compose(mul3, add1); - * add1mul3(4, function (err, result) { - * // result now equals 15 - * }); - */ -exports.default = (0, _baseRest2.default)(function (args) { - return _seq2.default.apply(null, args.reverse()); -}); -module.exports = exports['default'];
\ No newline at end of file |