diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-05-24 15:10:37 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-05-24 15:11:17 +0200 |
commit | 7a3df06eb573d36142bd1a8e03c5ce8752d300b3 (patch) | |
tree | 70bfaea8884c374876f607774850a3a51c0cb381 /node_modules/async/internal/wrapAsync.js | |
parent | aca1143cb9eed16cf37f04e475e4257418dd18ac (diff) |
fix build issues and add typedoc
Diffstat (limited to 'node_modules/async/internal/wrapAsync.js')
-rw-r--r-- | node_modules/async/internal/wrapAsync.js | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/node_modules/async/internal/wrapAsync.js b/node_modules/async/internal/wrapAsync.js index 862dc90f2..bc6c96668 100644 --- a/node_modules/async/internal/wrapAsync.js +++ b/node_modules/async/internal/wrapAsync.js @@ -3,11 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.isAsync = exports.supportsAsync = undefined; - -var _identity = require('lodash/identity'); - -var _identity2 = _interopRequireDefault(_identity); +exports.isAsync = undefined; var _asyncify = require('../asyncify'); @@ -17,17 +13,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de var supportsSymbol = typeof Symbol === 'function'; -function supportsAsync() { - var supported; - try { - /* eslint no-eval: 0 */ - supported = isAsync(eval('(async function () {})')); - } catch (e) { - supported = false; - } - return supported; -} - function isAsync(fn) { return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction'; } @@ -36,6 +21,5 @@ function wrapAsync(asyncFn) { return isAsync(asyncFn) ? (0, _asyncify2.default)(asyncFn) : asyncFn; } -exports.default = supportsAsync() ? wrapAsync : _identity2.default; -exports.supportsAsync = supportsAsync; +exports.default = wrapAsync; exports.isAsync = isAsync;
\ No newline at end of file |