source: trip-planner-front/node_modules/async/internal/wrapAsync.js@ 76712b2

Last change on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 616 bytes
Line 
1'use strict';
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.isAsync = undefined;
7
8var _asyncify = require('../asyncify');
9
10var _asyncify2 = _interopRequireDefault(_asyncify);
11
12function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
14var supportsSymbol = typeof Symbol === 'function';
15
16function isAsync(fn) {
17 return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction';
18}
19
20function wrapAsync(asyncFn) {
21 return isAsync(asyncFn) ? (0, _asyncify2.default)(asyncFn) : asyncFn;
22}
23
24exports.default = wrapAsync;
25exports.isAsync = isAsync;
Note: See TracBrowser for help on using the repository browser.