aboutsummaryrefslogtreecommitdiff
path: root/node_modules/async/constant.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/async/constant.js')
-rw-r--r--node_modules/async/constant.js65
1 files changed, 0 insertions, 65 deletions
diff --git a/node_modules/async/constant.js b/node_modules/async/constant.js
deleted file mode 100644
index d130ca679..000000000
--- a/node_modules/async/constant.js
+++ /dev/null
@@ -1,65 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _baseRest = require('lodash/_baseRest');
-
-var _baseRest2 = _interopRequireDefault(_baseRest);
-
-var _initialParams = require('./internal/initialParams');
-
-var _initialParams2 = _interopRequireDefault(_initialParams);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/**
- * Returns a function that when called, calls-back with the values provided.
- * Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to
- * [`auto`]{@link module:ControlFlow.auto}.
- *
- * @name constant
- * @static
- * @memberOf module:Utils
- * @method
- * @category Util
- * @param {...*} arguments... - Any number of arguments to automatically invoke
- * callback with.
- * @returns {Function} Returns a function that when invoked, automatically
- * invokes the callback with the previous given arguments.
- * @example
- *
- * async.waterfall([
- * async.constant(42),
- * function (value, next) {
- * // value === 42
- * },
- * //...
- * ], callback);
- *
- * async.waterfall([
- * async.constant(filename, "utf8"),
- * fs.readFile,
- * function (fileData, next) {
- * //...
- * }
- * //...
- * ], callback);
- *
- * async.auto({
- * hostname: async.constant("https://server.net/"),
- * port: findFreePort,
- * launchServer: ["hostname", "port", function (options, cb) {
- * startServer(options, cb);
- * }],
- * //...
- * }, callback);
- */
-exports.default = (0, _baseRest2.default)(function (values) {
- var args = [null].concat(values);
- return (0, _initialParams2.default)(function (ignoredArgs, callback) {
- return callback.apply(this, args);
- });
-});
-module.exports = exports['default']; \ No newline at end of file