PHP 7.4.33
Preview: wrapAsync.js Size: 955 B
/var/www/idmc.bitkit.dk/httpdocs/node_modules/async/internal/wrapAsync.js
'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});
exports.isAsyncIterable = exports.isAsyncGenerator = exports.isAsync = undefined;

var _asyncify = require('../asyncify.js');

var _asyncify2 = _interopRequireDefault(_asyncify);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function isAsync(fn) {
    return fn[Symbol.toStringTag] === 'AsyncFunction';
}

function isAsyncGenerator(fn) {
    return fn[Symbol.toStringTag] === 'AsyncGenerator';
}

function isAsyncIterable(obj) {
    return typeof obj[Symbol.asyncIterator] === 'function';
}

function wrapAsync(asyncFn) {
    if (typeof asyncFn !== 'function') throw new Error('expected a function');
    return isAsync(asyncFn) ? (0, _asyncify2.default)(asyncFn) : asyncFn;
}

exports.default = wrapAsync;
exports.isAsync = isAsync;
exports.isAsyncGenerator = isAsyncGenerator;
exports.isAsyncIterable = isAsyncIterable;

Directory Contents

Dirs: 0 × Files: 25
Name Size Perms Modified Actions
783 B lrw-rw-r-- 2024-09-23 09:37:21
Edit Download
1.93 KB lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
816 B lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
254 B lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
919 B lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
1.20 KB lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
2.23 KB lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
2.58 KB lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
1.58 KB lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
217 B lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
2.44 KB lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
289 B lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
279 B lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
1.43 KB lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
761 B lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
362 B lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
360 B lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
962 B lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
532 B lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
8.32 KB lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
270 B lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
695 B lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
857 B lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
251 B lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
955 B lrw-rw-r-- 2024-09-23 09:37:22
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).